RFR: 8347063: Add comments in ClassFileFormatVersion for class file format evolution history
Iris Clark
iris at openjdk.org
Mon Jan 6 20:23:39 UTC 2025
On Mon, 6 Jan 2025 18:26:54 GMT, Chen Liang <liach at openjdk.org> wrote:
> `javax.lang.model.SourceVersion` has a series of comments describing the new language features present in each source version. Similar comments for the `ClassFileFormatVersion` would be helpful, so readers no longer need to search through the JVMS to find changes in new versions.
Verified via consultation of the various platform JSRs.
Though this isn't done in SourceVersion, I'm wondering if it would be helpful to reference the associated JEPs which describe these changes (e.g. JEP 12 for Preview Features, 359 for Records (Preview), 384 Records (Second Preview), 395 Records, etc.).
src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java line 69:
> 67: * type annotations (Runtime(Inv/V)isibleTypeAnnotations);
> 68: * MethodParameters
> 69: * 9: modules (Module, ModuleMainClass, ModulePackages, CONSTANT_Module,
Consider referencing JSR 376 for the introduction of Modules. JEP 261 describes the changes to class files.
-------------
Marked as reviewed by iris (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22934#pullrequestreview-2532900096
PR Review Comment: https://git.openjdk.org/jdk/pull/22934#discussion_r1904596057
More information about the core-libs-dev
mailing list