RFR: 8343427: Class file load hook crashes on archived classes from multi-release JARs [v2]
Calvin Cheung
ccheung at openjdk.org
Wed Nov 20 22:02:35 UTC 2024
On Wed, 20 Nov 2024 19:00:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> updated testcase
>
> test/hotspot/jtreg/runtime/cds/appcds/jvmti/CFLH/MultiReleaseJars.java line 151:
>
>> 149: // create multi-version.jar which contains Main.class, Foo.class and Bar.class.
>> 150: // Foo.class has only one version: base version 9.
>> 151: // Bar.class has two versions: base version 9 and default version.
>
> Since there's no default version for Foo, does the class loader try to get the highest version (9 in this case) that's the same or below the current JDK's version? I think such a comment in the test case would be helpful.
>
> Also, perhaps the test should look like this:
>
>
> META-INF/versions/9/Foo.class
> META-INF/versions/11/Foo.class
>
>
> where the different Foo classes print a different string. We should assert that we get version 11 instead of 9.
I've updated the test. Instead of version 11, I've used the major JDK version.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22262#discussion_r1851035865
More information about the hotspot-dev
mailing list