On Wed, 30 Oct 2024 13:22:21 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> I believe the check is already being done, right on the next line: >> https://github.com/openjdk/jdk/blob/821c514a132e809a14648ddbb56f2ffee85fd35a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java#L192 >> which leads to: >> https://github.com/openjdk/jdk/blob/821c514a132e809a14648ddbb56f2ffee85fd35a/src/java.base/share/classes/jdk/internal/misc/VM.java#L188 >> which then leads to: >> https://github.com/openjdk/jdk/blob/821c514a132e809a14648ddbb56f2ffee85fd35a/src/java.base/share/classes/jdk/internal/misc/VM.java#L174 >> which has this check: >> https://github.com/openjdk/jdk/blob/821c514a132e809a14648ddbb56f2ffee85fd35a/src/java.base/share/classes/jdk/internal/misc/VM.java#L179 >> >> I tried with a `module-info.class` with major version 65, and minor version >> 0xFFFF, and it correctly threw the exception for me. >> >> Do I miss something? > >> Do I miss something? > > Okay, so this must have been modified at some point to add/use > isSupportedModuleDescriptorVersion, in which case readModuleAttribute won't > be called. In that case, what you have is okay. > > Minor nit, can you fix up the code style in the modified expression as it has > ended up with && at the start and end of lines which looks a bit messy. Thanks, done: https://github.com/openjdk/jdk/pull/21431/commits/9ae10e2c43d240ba3647531c4d041589cf02875d ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21431#discussion_r1822863309