Issue regarding hugeLength() method of ArraysSupport class in java.internal.util package
Ananya Nayak
ananyanayak102 at gmail.com
Tue Jul 26 15:50:40 UTC 2022
After analysing the method declaration carefully I realized some bugs in
the code:
1. the if condition on seeing min length as less than 0 returns out of
memory error with a message that "required length is too large" which is
contradictory to what we are checking in the condition.
2. We should actually return the out of memory error when it exceeds the
SOFT_ARRAY_MAX_LENGTH
3. Moreover we are returning minLength in the third condition when we
actually shouldn't because it exceeds the limit
Kindly verify this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20220726/8a5b3670/attachment.htm>
More information about the build-dev
mailing list