[lworld] RFR: 8326879: [lworld] IncompatibleClassChangeError on `value record` extending java.lang.Record
Roger Riggs
rriggs at openjdk.org
Wed Feb 28 18:40:59 UTC 2024
"value records" implicitly extend the abstract class java.lang.Record.
Class loading throws IncompatibleClassChangeError if java.lang.Record is not marked as "abstract value class".
The tests affected are:
valhalla/valuetypes/ObjectMethods.java: test Object methods on value classes
valhalla/valuetypes/ObjectMethodsViaCondy.java: Test ObjectMethods::bootstrap call via condy
The solution is to add java.lang.Record to the set of classes that are modified for --enable-preview to be `value` classes.
-------------
Commit messages:
- Run various tests of Records with -XX:+EnableValhalla
- 8326879: [lworld] IncompatibleClassChangeError on `value record` extending java.lang.Record
Changes: https://git.openjdk.org/valhalla/pull/1027/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1027&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8326879
Stats: 17 lines in 6 files changed: 7 ins; 0 del; 10 mod
Patch: https://git.openjdk.org/valhalla/pull/1027.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1027/head:pull/1027
PR: https://git.openjdk.org/valhalla/pull/1027
More information about the valhalla-dev
mailing list