-Djava.lang.stringBuffer.growAggressively
Restriction: This system property is supported only on Java™ 8.
Setting this property to false
reverts to the behavior (Eclipse OpenJ9™ 0.18 and earlier) of growing a 1 G char[]
or larger StringBuffer
or StringBuilder
only as much as necessary to accommodate the String
being added. The default behavior is to immediately grow to the maximum possible size, similarly to Java 11 and later. The default behavior is compatible with the Oracle HotSpot VM.
Syntax
-Djava.lang.stringBufferAndBuilder.growAggressively=[true|false]
Setting | Effect | Default |
---|---|---|
true | Above 1 G, grow to the maximum size | yes |
false | Above 1 G, grow only as required |