On Fri, 29 Jul 2022 21:19:27 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> src/hotspot/share/prims/jvm.cpp line 4059: >> >>> 4057: return JVM_CLASSFILE_MAJOR_VERSION; >>> 4058: } >>> 4059: assert(!java_lang_Class::as_Klass(mirror)->is_array_klass(), >>> "unexpected array class"); >> >> Can this throw IllegalArgumentException instead. >> Asserts only report problems when built with debug (Right?) > > Or, Can the VM do this traversal as/more efficiently than doing at the java > level? It is usual for the Java code to do such checks and throw exceptions, so that the VM assumes it is correct and only asserts incase something has been missed on the Java side. ------------- PR: https://git.openjdk.org/jdk/pull/9688