[lworld] RFR: 8375740: [lworld] javap prints "value class" while class flags indicate ACC_IDENTITY
Vicente Romero
vromero at openjdk.org
Tue Jan 20 23:58:14 UTC 2026
On Tue, 20 Jan 2026 20:58:46 GMT, Chen Liang <liach at openjdk.org> wrote:
> Seems like an oversight where "value" is added unconditionally. I changed the behavior to add "identity" for preview identity classes, which was never printed before (because identity is not a source modifier)
>
> Testing: langtools/tools/javap + javac
src/jdk.jdeps/share/classes/com/sun/tools/javap/ClassWriter.java line 825:
> 823: Set<String> classModifers = getModifiers(flagSet);
> 824: // ACC_IDENTITY is not a source modifier
> 825: classModifers.add(flagSet.contains(AccessFlag.IDENTITY) ? "identity" : "value");
nit, I would say probably better to print nothing if the class is identity and print `value` if it is a value class
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1938#discussion_r2710473329
More information about the valhalla-dev
mailing list