diff -r 05512c61a402 -r 682e3deac7ce jdk/src/share/classes/java/lang/AbstractStringBuilder.java --- a/jdk/src/share/classes/java/lang/AbstractStringBuilder.java Thu May 13 21:30:18 2010 -0700 +++ b/jdk/src/share/classes/java/lang/AbstractStringBuilder.java Thu May 13 21:56:13 2010 -0700 @@ -117,7 +117,7 @@ * size check or synchronization. */ void expandCapacity(int minimumCapacity) { - int newCapacity = value.length * 2; + int newCapacity = value.length * 2 + 2; if (newCapacity - minimumCapacity < 0) newCapacity = minimumCapacity; if (newCapacity < 0) {