RFR: 8247373: ArraysSupport.newLength doc, test, and exception message [v2]
Martin Buchholz
martin at openjdk.java.net
Sun Jan 24 20:07:43 UTC 2021
On Fri, 4 Dec 2020 17:31:20 GMT, Stuart Marks <smarks at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 654:
>>
>>> 652: return SOFT_MAX_ARRAY_LENGTH;
>>> 653: } else {
>>> 654: return minLength;
>>
>> Isn't this last `else if... then.. else` the same as:
>> `return Math.max(minLength, SOFT_MAX_ARRAY_LENGTH)`
>
> It is, and I considered replacing it, but I felt that it obscured what was going on.
Competing parts of Martin's brain are voting for Roger's and Stuart's versions.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1617
More information about the core-libs-dev
mailing list