RFR (XS) 8076759: AbstractStringBuilder.append(...) should ensure enough capacity for the upcoming "trivial" append calls

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri May 8 11:28:13 UTC 2015

On 05/07/2015 06:00 PM, Ulf Zibis wrote:
> May be:
> ..., then a new internal array becomes allocated and refilled with
> greater capacity.
> ... to give a hint, that this action may be expensive.

The Javadoc already says "If the current capacity is less than the
argument, then a new internal array is allocated with greater capacity",
which seems to be what you are saying.

Anyway, CCC request is in flight, and changes there will require
re-spinning. I am not tempted to do that if the current language is good
and already fits your concerns.


More information about the core-libs-dev mailing list