jdk/src/share/classes/java/lang/AbstractStringBuilder.java
changeset 5603 682e3deac7ce
parent 5466 f130bb07764b
child 5627 e636ac7a63a4
--- 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) {