RFR: 8275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE [v2]
Andrey Turbanov
duke at openjdk.java.net
Mon Oct 11 18:52:17 UTC 2021
On Sun, 10 Oct 2021 22:13:29 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 275002: Remove unused AbstractStringBuilder.MAX_ARRAY_SIZE
>> update javadoc of 'newCapacity' method to refer ArraysSupport.SOFT_MAX_ARRAY_LENGTH instead
>
> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 240:
>
>> 238: * OutOfMemoryError: Requested array size exceeds VM limit
>> 239: */
>> 240: private static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;
>
> Looks like the usage of this field was removed by the https://github.com/openjdk/lanai/commit/03642a01, note that the doc for the "newCapacity" is still mentioned this field.
doc updated
-------------
PR: https://git.openjdk.java.net/jdk/pull/5878
More information about the core-libs-dev
mailing list