Relates :
|
|
Relates :
|
The javap tool requires enhancement to support the JVM changes of Value Classes and Objects, as described in JDK-8317278. There are three class file changes: 1) The ACC_IDENTITY flag on class declarations, which replaces ACC_SUPER 2) The ACC_STRICT flag on fields (previously used on methods in legacy classes) 3) The LoadableDescriptors attribute, which contains a list of Utf8 descriptors Because these features are only defined for preview-versioned class files, and because certain bits are being re-used, the appropriate output may not be obvious in some cases. Some guidance: - There is no --enable-preview mode for javap: it should faithfully display the contents of (at least) any class file supported by this release, whether preview or not - In a preview-versioned class file, the 0x0020 class flag should be rendered 'ACC_IDENTITY'; in a non-preview class file, the 0x0020 class flag should be rendered 'ACC_SUPER' - Where javap is displaying language-level modifiers ("public abstract class Foo"), it should include 'value' for any preview-versioned class (not interface) that lacks the 'ACC_IDENTITY' flag. - The 'ACC_STRICT' field flag should should be listed in preview-versioned class files, and should be treated just like any other undefined flag in non-preview class files (per JVMS, "should be ignored by Java Virtual Machine implementations"—although ideally javap should acknowledge that they are set); like ACC_SYNTHETIC, there is no language-level modifier corresponding to ACC_STRICT. - The LoadableDescriptors attribute should be properly recognized and displayed when it appears in a preview-versioned class file; it should be treated as an unspecified attribute in a non-preview-versioned class file.