src/main/java/org/jboss/util/JBossStringBuilder.java
/**
    * Expand the capacity to the greater of the minimum
    * or twice the current size
    * 
    * @param minimum the minimum
    */
Expand the capacity to the greater of the minimum
or twice the current size

@param minimum the minimum
Expand the capacity to the greater of the minimum or twice the current size @param minimum the minimum
protected void expandCapacity(int minimum)
   {
      int newSize = chars.length * 2;
      if (minimum > newSize)
         newSize = minimum;
      char[] newChars = new char[newSize];
      System.arraycopy(chars, 0, newChars, 0, pos);
      chars = newChars;
   }
protected void expandCapacity ( int minimum ) { int newSize = chars . length * 2 ; if ( minimum > newSize ) newSize = minimum ; char [ ] newChars = new char [ newSize ] ; System . arraycopy ( chars , 0 , newChars , 0 , pos ) ; chars = newChars ; }
Expand the capacity to the greater of the minimum
 or twice the current size
Expand the capacity to the greater of the minimum or twice the current size