RFR: 8371164: ArrayList.addAll() optimizations [v2]

Johannes Döbler duke at openjdk.org
Tue Nov 4 20:26:25 UTC 2025


On Tue, 4 Nov 2025 20:18:20 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> That variant is incorrect since `size <= a.length`, potentially adding a surprising tail of `null` elements to the list.

@cl4es right, my suggestion was incorrect, thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28116#discussion_r2491949708


More information about the core-libs-dev mailing list