Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296182

Start of release updates for JDK 21

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 21
    • core-libs
    • None
    • source
    • minimal
    • Java API
    • SE

    Description

      Summary

      Update core libraries for JDK 21 by adding an enum constant to ClassFileFormatVersion.

      Problem

      With a new release, ClassFileFormatVersion needs a constant to model that release.

      Solution

      Add the new constant.

      Specification

      --- a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java
      +++ b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java
      @@ -262,7 +262,17 @@ public enum ClassFileFormatVersion {
            * href="https://docs.oracle.com/javase/specs/jvms/se20/html/index.html">
            * <cite>The Java Virtual Machine Specification, Java SE 20 Edition</cite></a>
            */
      -    RELEASE_20(64);
      +    RELEASE_20(64),
      +
      +    /**
      +     * The version recognized by the Java Platform, Standard Edition
      +     * 21.
      +     *
      +     * @see <a
      +     * href="https://docs.oracle.com/javase/specs/jvms/se21/html/index.html">
      +     * <cite>The Java Virtual Machine Specification, Java SE 21 Edition</cite></a>
      +     */
      +    RELEASE_21(65);
      
           // Note to maintainers: when adding constants for newer releases,
           // the implementation of latest() must be updated too.
      @@ -277,7 +287,7 @@ public enum ClassFileFormatVersion {
            * {@return the latest class file format version}
            */
           public static ClassFileFormatVersion latest() {
      -        return RELEASE_20;
      +        return RELEASE_21;
           }
      
           /**

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              darcy Joe Darcy
              Iris Clark
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: