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

Start of release updates for JDK 22

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 22
    • core-libs
    • None
    • behavioral
    • minimal
    • Java API
    • SE

    Description

      Summary

      Update core libraries for JDK 22 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

      diff --git a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java
      index 81ceaa96f50..192024d8344 100644
      --- a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java
      +++ b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java
      @@ -274,7 +274,19 @@ public enum ClassFileFormatVersion {
            * 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);
      +    RELEASE_21(65),
      +
      +    /**
      +     * The version recognized by the Java Platform, Standard Edition
      +     * 22.
      +     *
      +     * @since 22
      +     *
      +     * @see <a
      +     * href="https://docs.oracle.com/javase/specs/jvms/se22/html/index.html">
      +     * <cite>The Java Virtual Machine Specification, Java SE 22 Edition</cite></a>
      +     */
      +    RELEASE_22(66);
      
           // Note to maintainers: when adding constants for newer releases,
           // the implementation of latest() must be updated too.
      @@ -289,7 +301,7 @@ public enum ClassFileFormatVersion {
            * {@return the latest class file format version}
            */
           public static ClassFileFormatVersion latest() {
      -        return RELEASE_21;
      +        return RELEASE_22;
           }
      
           /**

      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: