On Tue, 8 Oct 2024 19:16:00 GMT, Chen Liang <li...@openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/constant/ArrayClassDescImpl.java >> line 81: >> >>> 79: throw new IllegalStateException( >>> 80: "Cannot create an array type descriptor with more than " >>> 81: + MAX_ARRAY_TYPE_DESC_DIMENSIONS + " >>> dimensions"); >> >> Suggestion: >> >> ConstantUtils.validateArrayDepth(rank + 1); > > Unfortunately, this has to throw ISE while `validateArrayDepth` throws IAE. I have extracted this to a new utility method, with a switch on the thrown exception type. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20665#discussion_r1792400368