ArraysSupport.newLength is an internal method in jdk.internal.util that does safe array length computations.
1) It throws OutOfMemoryError in certain cases. The message should include the details of the request (current length + required minimum growth) that could not be fulfilled.
2) The doc comment is fairly verbose, yet it doesn't explain the method very well nor why it's useful. See the writeup here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-June/066928.html
This is part of a larger discussion on this thread:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-May/066844.html
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-June/066865.html
3) There is no unit test for this method. Given its intricacy, it should have one.
1) It throws OutOfMemoryError in certain cases. The message should include the details of the request (current length + required minimum growth) that could not be fulfilled.
2) The doc comment is fairly verbose, yet it doesn't explain the method very well nor why it's useful. See the writeup here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-June/066928.html
This is part of a larger discussion on this thread:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-May/066844.html
http://mail.openjdk.java.net/pipermail/core-libs-dev/2020-June/066865.html
3) There is no unit test for this method. Given its intricacy, it should have one.
- relates to
-
JDK-8230744 Several classes throw OutOfMemoryError without message
-
- Resolved
-
-
JDK-8210577 adjust OutOfMemoryError specification to mention implementation limits being exceeded
-
- Open
-
-
JDK-8246725 Provide MAX_ARRAY_SIZE publicly
-
- Open
-
There are no Sub-Tasks for this issue.