On Tue, 20 Jan 2026 20:58:46 GMT, Chen Liang <[email protected]> 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

Reply via email to