8233751: StringBuilder / StringBuffer capacity() doc is misleading

Reviewed-by: bchristi
This commit is contained in:
Jim Laskey 2020-01-07 09:03:00 -04:00
parent e72f6028fb
commit 0cb75321ef

View file

@ -181,9 +181,9 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
}
/**
* Returns the current capacity. The capacity is the amount of storage
* available for newly inserted characters, beyond which an allocation
* will occur.
* Returns the current capacity. The capacity is the number of characters
* that can be stored (including already written characters), beyond which
* an allocation will occur.
*
* @return the current capacity
*/