RFR: 8283067: Incorrect comment in java.base/share/classes/java/util/ArrayList.java

xpbob duke at openjdk.java.net
Sun Mar 13 01:51:46 UTC 2022


On Sat, 12 Mar 2022 14:58:48 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:

> The comment is correct, it is just that the backing array allocation is delayed until the first element is added to the list. Thanks.

@merykitty 
Thanks to review.
After new ArrayList, don't know whether to add an element.
The array allocation may not be performed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7799


More information about the core-libs-dev mailing list