RFR: 8255342: Remove non-specified JVM checks on Classes with Record attributes
David Holmes
dholmes at openjdk.java.net
Mon Oct 26 03:56:35 UTC 2020
On Fri, 23 Oct 2020 20:30:23 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> Please review this fix to remove the checks for non-final and abstract classes containing Record attributes and checks for classes containing Record attributes whose supers are not java.lang.Record. These checks are not specified in the JVM Spec and so should not be done by the JVM.
>
> The change removes the checks and updates Record tests as needed.
>
> The fix was tested with mach5 tiers 1 and 2 on Linux, Windows, and Mac, and tiers 3-5 on Linux x64 and with JCK lang, vm, and api/java_lang tests.
>
> Thanks, Harold
Hi Harold,
Generally looks good, but you need a new test case - see below.
Thanks,
David
test/hotspot/jtreg/runtime/records/recordAttributeTest.java line 76:
> 74: // Test that loading a class causes the Record attribute to get parsed
> 75: // even if its super class is not java.lang.Record
> 76: runTest("superNotJLRecord", "Truncated class file");
This simple "inversion" of the test is not sufficient. The original test was that a bad record attribute is ignored when not a subclass of j.l.Record. The modified test should be that a bad record attribute is never ignored. But in addition there should be a new test that a good record attribute in a class that does not subclass j.l.Record, is also okay.
-------------
Changes requested by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/845
More information about the hotspot-runtime-dev
mailing list