From 44a7c623da30dfe12b71ad3be595c082a39e75b7 Mon Sep 17 00:00:00 2001 From: jgish Date: Wed, 19 Sep 2012 08:52:21 -0400 Subject: [PATCH] 4722265: (spec str) StringBuffer.ensureCapacity() should mention that capacity is mutable Summary: add usage note to AbstractStringBuilder ensureCapacity() Reviewed-by: mduigou, dholmes, chegar --- src/share/classes/java/lang/AbstractStringBuilder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/share/classes/java/lang/AbstractStringBuilder.java b/src/share/classes/java/lang/AbstractStringBuilder.java index eb38da21c..8d91bb5eb 100644 --- a/src/share/classes/java/lang/AbstractStringBuilder.java +++ b/src/share/classes/java/lang/AbstractStringBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.ob * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -96,6 +96,8 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * * If the {@code minimumCapacity} argument is nonpositive, this * method takes no action and simply returns. + * Note that subsequent operations on this object can reduce the + * actual capacity below that requested here. * * @param minimumCapacity the minimum desired capacity. */ -- GitLab