On Mon, 25 Aug 2025 22:00:06 GMT, Chen Liang <[email protected]> wrote:
> Improve access flag reflection for preview on/off.
>
> In this process, I noted javac is incorrectly injecting ACC_IDENTITY to 69.0
> class' `InnerClasses` attribute and fixed that.
>
> There is still some inconsistency, such as implying ACC_IDENTITY when preview
> is on for classes. Don't know if we have discussed on this yet.
>
> No new test failures.
src/java.base/share/classes/jdk/internal/classfile/impl/AccessFlagsImpl.java
line 58:
> 56: public Set<AccessFlag> flags() {
> 57: if (flags == null)
> 58: flags = AccessFlag.maskToAccessFlags(flagsMask, location,
> ClassFileFormatVersion.CURRENT_PREVIEW_FEATURES);
Temporary - I will convert this to be CFFV-context-aware later, which is not a
trivial change to the ClassFile API.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1533#discussion_r2307981822