[lworld] RFR: 8328543: [lworld] Library and test updates to use --enable-preview instead of ValhallaFeatures
Roger Riggs
rriggs at openjdk.org
Fri Mar 22 22:17:37 UTC 2024
On Fri, 22 Mar 2024 20:49:13 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> `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.
Yes for IDENTITY; I don't think the spec for STRICT has settled enough yet to define the behavior as part of JEP 401.
> 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?
The wording of the spec makes it difficult to support SUPER and IDENTITY at the same time flipped on --enable-preview. SUPER is described as being ignored.
It says that 0x0020 means IDENTITY regardless of the class file version number.
The repo hasn't yet sync'd with the mainline changes for jdk23. When that happens, SUPER can be meaningful only for 22 and ignored for 23 and IDENTITY can hold that bit position.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1060#issuecomment-2016010068
PR Review Comment: https://git.openjdk.org/valhalla/pull/1060#discussion_r1536271528
More information about the valhalla-dev
mailing list