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

Add SourceVersion.RELEASE_16

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add a new enum constant RELEASE_16 to javax.lang.model.SourceVersion for the JDK 16 release and update the FooVisitor14 visitors to cover release 16 as well.

      Problem

      The SourceVersion enum needs an enum constant for each release being modeled.

      Solution

      Append the enum constant RELEASE_16 and update the visitor text and supported source version annotations to cover from RELEASE_14 to RELEASE_16.

      Specification

      --- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2020-05-18 17:29:44.425965037 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java 2020-05-18 17:29:44.154101028 -0700
      @@ -215,7 +215,15 @@
            *
            * @since 15
            */
      -     RELEASE_15;
      +    RELEASE_15,
      +
      +    /**
      +     * The version recognized by the Java Platform, Standard Edition
      +     * 16.
      +     *
      +     * @since 16
      +     */
      +     RELEASE_16;
      
      
      --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java 2020-05-18 17:29:45.417469073 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java 2020-05-18 17:29:45.141607063 -0700
      @@ -44,7 +44,7 @@
        * @see AbstractAnnotationValueVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public abstract class AbstractAnnotationValueVisitor14<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
      
           /**
      --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java 2020-05-18 17:29:46.313021106 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java 2020-05-18 17:29:46.053151096 -0700
      @@ -58,7 +58,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public abstract class AbstractElementVisitor14<R, P> extends AbstractElementVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call.
      --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor14.java    2020-05-18 17:29:47.228563139 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor14.java    2020-05-18 17:29:46.972691130 -0700
      @@ -47,7 +47,7 @@
        * @see AbstractTypeVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public abstract class AbstractTypeVisitor14<R, P> extends AbstractTypeVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call.
      --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java 2020-05-18 17:29:48.128113172 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java 2020-05-18 17:29:47.872241162 -0700
      @@ -70,7 +70,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class ElementKindVisitor14<R, P> extends ElementKindVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java 2020-05-18 17:29:49.019667204 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java 2020-05-18 17:29:48.755799194 -0700
      @@ -85,7 +85,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class ElementScanner14<R, P> extends ElementScanner9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor14.java   2020-05-18 17:29:49.903225236 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor14.java   2020-05-18 17:29:49.647353227 -0700
      @@ -52,7 +52,7 @@
        * @see SimpleAnnotationValueVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class SimpleAnnotationValueVisitor14<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java   2020-05-18 17:29:50.798777268 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java   2020-05-18 17:29:50.542905259 -0700
      @@ -66,7 +66,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class SimpleElementVisitor14<R, P> extends SimpleElementVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor14.java  2020-05-18 17:29:51.694329301 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor14.java  2020-05-18 17:29:51.442455292 -0700
      @@ -56,7 +56,7 @@
        * @see SimpleTypeVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class SimpleTypeVisitor14<R, P> extends SimpleTypeVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      --- old/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor14.java    2020-05-18 17:29:52.581885333 -0700
      +++ new/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor14.java    2020-05-18 17:29:52.330011324 -0700
      @@ -61,7 +61,7 @@
        * @see TypeKindVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_15)
      +@SupportedSourceVersion(RELEASE_16)
       public class TypeKindVisitor14<R, P> extends TypeKindVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call; uses {@code null}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              darcy Joe Darcy
              Reviewed By:
              Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: