RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Tue Oct 1 05:39:09 UTC 2024


On Tue, 1 Oct 2024 03:38:26 GMT, Stuart Marks <smarks at openjdk.org> wrote:

> The comment is a bit misleading. I'm not sure any comment is warranted, as you had observed, there's a big description next to SOFT_MAX_ARRAY_LENGTH. I'm also not sure a new local variable maxArrayLength adds anything.

Thanks, I have removed the comment and variable for these two tests.

I guess I felt SOFT_MAX_ARRAY_LENGTH looked a bit lonely here, given that it was just used as an argument and had no constant or comment like in most other instances. But I agree that the comment and the variable does not add much value here, the name of the test makes it clear that this is about capacity and the documentation on SOFT_MAX_ARRAY_LENGTH is just a click away.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21268#discussion_r1782140912


More information about the nio-dev mailing list