On Tue, 9 Jun 2026 12:50:38 GMT, ExE Boss <[email protected]> wrote: >> Frederic Parain has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixes > > src/java.base/share/classes/jdk/internal/value/ValueClass.java line 93: > >> 91: } >> 92: if (length < 0) { >> 93: throw new IllegalArgumentException("Array length is >> negative"); > > There is an exact exception for this (also thrown by > [`java.lang.reflect.Array::newInstance`]): > Suggestion: > > throw new NegativeArraySizeException(Integer.toString(length)); > > > [`java.lang.reflect.Array::newInstance`]: > https://docs.oracle.com/en/java/javase/26/docs/api/java.base/java/lang/reflect/Array.html#newInstance(java.lang.Class,int)
Thank you for spotting this issue. The exception has been fixed as well as the related tests. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2435#discussion_r3381408409
