changeset 57566:32d0fe687ec2

8233751: StringBuilder / StringBuffer capacity() doc is misleading Reviewed-by: bchristi
author jlaskey
date Tue, 07 Jan 2020 09:03:00 -0400
parents 8d3112f373d5
children d5cbc97b917f
files src/java.base/share/classes/java/lang/AbstractStringBuilder.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Mon Jan 06 17:23:57 2020 -0800
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Tue Jan 07 09:03:00 2020 -0400
@@ -181,9 +181,9 @@
     }
 
     /**
-     * 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
      */