Skip to content

Commit

Permalink
8295071: Spec Clarification : ClassFileFormatVersion: System property…
Browse files Browse the repository at this point in the history
… java.class.version | Java class format version number

Reviewed-by: iris, alanb, rriggs
  • Loading branch information
jddarcy committed Jun 6, 2023
1 parent 571fbdc commit d82436e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
5 changes: 4 additions & 1 deletion src/java.base/share/classes/java/lang/System.java
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,10 @@ public static native void arraycopy(Object src, int srcPos,
* <tr><th scope="row">{@systemProperty java.specification.name}</th>
* <td>Java Runtime Environment specification name</td></tr>
* <tr><th scope="row">{@systemProperty java.class.version}</th>
* <td>Java class format version number</td></tr>
* <td>{@linkplain java.lang.reflect.ClassFileFormatVersion#latest() Latest}
* Java class file format version recognized by the Java runtime as {@code "MAJOR.MINOR"}
* where {@link java.lang.reflect.ClassFileFormatVersion#major() MAJOR} and {@code MINOR}
* are both formatted as decimal integers</td></tr>
* <tr><th scope="row">{@systemProperty java.class.path}</th>
* <td>Java class path (refer to
* {@link ClassLoader#getSystemClassLoader()} for details)</td></tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
* added to model future releases of the Java Virtual Machine
* Specification.
*
* @apiNote
* The complete version used in a class file includes a major version
* and a minor version; this enum only models the major version. A
* Java virtual machine implementation is required to support a range
* of major versions; see the corresponding edition of the <cite>The
* Java Virtual Machine Specification</cite> for details.
*
* @since 20
* @see System#getProperties System property {@code java.class.version}
* @see java.compiler/javax.lang.model.SourceVersion
Expand Down Expand Up @@ -64,7 +71,7 @@ public enum ClassFileFormatVersion {
RELEASE_1(45),

/**
* The version recognized by the Java 2 Platform, Standard Edition,
* The version introduced by the Java 2 Platform, Standard Edition,
* v 1.2.
*
* The format described in <cite>The Java Virtual Machine
Expand All @@ -74,19 +81,19 @@ public enum ClassFileFormatVersion {
RELEASE_2(46),

/**
* The version recognized by the Java 2 Platform, Standard Edition,
* The version introduced by the Java 2 Platform, Standard Edition,
* v 1.3.
*/
RELEASE_3(47),

/**
* The version recognized by the Java 2 Platform, Standard Edition,
* The version introduced by the Java 2 Platform, Standard Edition,
* v 1.4.
*/
RELEASE_4(48),

/**
* The version recognized by the Java 2 Platform, Standard
* The version introduced by the Java 2 Platform, Standard
* Edition 5.0.
*
* @see <a
Expand All @@ -100,7 +107,7 @@ public enum ClassFileFormatVersion {
RELEASE_5(49),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 6.
*
* @see <a
Expand All @@ -110,7 +117,7 @@ public enum ClassFileFormatVersion {
RELEASE_6(50),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 7.
*
* @see <a
Expand All @@ -120,7 +127,7 @@ public enum ClassFileFormatVersion {
RELEASE_7(51),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 8.
*
* @see <a
Expand All @@ -132,7 +139,7 @@ public enum ClassFileFormatVersion {
RELEASE_8(52),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 9.
*
* @see <a
Expand All @@ -144,7 +151,7 @@ public enum ClassFileFormatVersion {
RELEASE_9(53),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 10.
*
* @see <a
Expand All @@ -154,7 +161,7 @@ public enum ClassFileFormatVersion {
RELEASE_10(54),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 11.
*
* @see <a
Expand All @@ -166,7 +173,7 @@ public enum ClassFileFormatVersion {
RELEASE_11(55),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 12.
*
* @see <a
Expand All @@ -176,7 +183,7 @@ public enum ClassFileFormatVersion {
RELEASE_12(56),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 13.
*
* @see <a
Expand All @@ -186,7 +193,7 @@ public enum ClassFileFormatVersion {
RELEASE_13(57),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 14.
*
* @see <a
Expand All @@ -196,7 +203,7 @@ public enum ClassFileFormatVersion {
RELEASE_14(58),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 15.
*
* @see <a
Expand All @@ -208,7 +215,7 @@ public enum ClassFileFormatVersion {
RELEASE_15(59),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 16.
*
* @see <a
Expand All @@ -218,7 +225,7 @@ public enum ClassFileFormatVersion {
RELEASE_16(60),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 17.
*
* Additions in this release include sealed classes and
Expand All @@ -235,7 +242,7 @@ public enum ClassFileFormatVersion {
RELEASE_17(61),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 18.
*
* @see <a
Expand All @@ -245,7 +252,7 @@ public enum ClassFileFormatVersion {
RELEASE_18(62),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 19.
*
* @see <a
Expand All @@ -255,7 +262,7 @@ public enum ClassFileFormatVersion {
RELEASE_19(63),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 20.
*
* @see <a
Expand All @@ -265,7 +272,7 @@ public enum ClassFileFormatVersion {
RELEASE_20(64),

/**
* The version recognized by the Java Platform, Standard Edition
* The version introduced by the Java Platform, Standard Edition
* 21.
*
* @since 21
Expand Down

1 comment on commit d82436e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.