[lworld] RFR: 8328543: [lworld] Library and test updates to use --enable-preview instead of ValhallaFeatures

Mandy Chung mchung at openjdk.org
Fri Mar 22 20:51:28 UTC 2024


On Fri, 22 Mar 2024 20:12:13 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Update AccessFlag and tests to JEP 401 and use of --enable-preview instead of ValhallaFeatures.
> Minor formatting change to java.lang.Character to allow it to be a value class with --enable-preview.
> (The class file format version numbers will need to be updated when re-synching with the mainline).

`AccessFlag::IDENTITY` and `STRICT`  are missing `@PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS)`.   Need to do a pass on the new APIs to add `@PreviewFeature` if missing and that may cause additional change.

src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 188:

> 186:      * In Java SE 8 and above, the JVM treats the {@code ACC_SUPER}
> 187:      * flag as set in every class file (JVMS {@jvms 4.1}).
> 188:      * For class file versions up to but not including Valhalla,

The javadoc should reference to "preview feature" rather than "Valhalla"

src/java.base/share/classes/java/lang/reflect/AccessFlag.java line 196:

> 194:             @Override
> 195:             public Set<Location> apply(ClassFileFormatVersion cffv) {
> 196:                 return (cffv.compareTo(ClassFileFormatVersion.RELEASE_22) >= 0)

Shouldn't it check for preview enabled?

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

PR Review: https://git.openjdk.org/valhalla/pull/1060#pullrequestreview-1955764152
PR Review Comment: https://git.openjdk.org/valhalla/pull/1060#discussion_r1536199910
PR Review Comment: https://git.openjdk.org/valhalla/pull/1060#discussion_r1536204830



More information about the valhalla-dev mailing list