--- old/./src/share/classes/java/lang/AbstractStringBuilder.java 2012-08-20 20:16:59.563084239 -0400 +++ new/./src/share/classes/java/lang/AbstractStringBuilder.java 2012-08-20 20:16:59.459084241 -0400 @@ -1386,6 +1386,29 @@ } /** + * Appends {@code n} concatenated copies of the CharSequence to the + * current value. If {@code n == 0}, then adds the empty string. If + * @{code cs} is {@code null}, then adds {@code "null"} {@code n} times. + * + * @param n the number of copies of the CharSequence to concatenate + * @param cs the CharSequence to concatenate (n times) + * @return a reference to this object + * @throws IllegalArgumentException if n < 0 + * @since 1.8 + */ + public AbstractStringBuilder append(int n, CharSequence cs) { + if (n < 0) { + throw new IllegalArgumentException("n < 0"); + } + + for (int i = 0; i < n; i++) { + append(cs); + } + + return this; + } + + /** * Returns a string representing the data in this sequence. * A new {@code String} object is allocated and initialized to * contain the character sequence currently represented by this