RFR: 8291360: Create entry points to expose low-level class file information

Harold Seigel hseigel at openjdk.org
Mon Aug 1 15:17:56 UTC 2022


On Sun, 31 Jul 2022 22:22:24 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Please review this change to fix JDK-8291360.  This fix adds entry points getClassFileVersion() and getClassAccessFlagsRaw() to class java.lang.Class.  The new entry points return the current class's class file version and its raw access flags.
>> 
>> The fix was tested by running Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 1-3 on Linux x64.  Additionally, the JCK lang, vm, and api tests and new regression tests were run locally on Linux x64.
>> 
>> Thanks, Harold
>
> test/hotspot/jtreg/runtime/ClassFile/ClassFileVersionTest.java line 55:
> 
>> 53: 
>> 54:         testIt("Version64", 64);
>> 55:         testIt("Version59", 59);
> 
> Any particular reason to choose 59? Shouldn't there also be tests for non-zero minor versions?

No particular reason for choosing 59 other than it's different and less than 64.  Test case Version64_65535 has a non-zero minor version.

-------------

PR: https://git.openjdk.org/jdk/pull/9688



More information about the build-dev mailing list