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

Add SourceVersion.RELEASE_15

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 15
    • core-libs
    • None
    • minimal
    • Java API
    • SE

      Summary

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

      Problem

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

      Solution

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

      Specification

      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/SourceVersion.java
      --- a/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java   Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java   Fri Dec 06 21:43:53 2019 -0800
      
      @@ -203,7 +205,15 @@
            *
            * @since 14
            */
      -     RELEASE_14;
      +    RELEASE_14,
      +
      +    /**
      +     * The version recognized by the Java Platform, Standard Edition
      +     * 15.
      +     *
      +     * @since 15
      +     */
      +     RELEASE_15;
      
      
      
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java   Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor14.java   Fri Dec 06 21:39:33 2019 -0800
      @@ -59,7 +59,7 @@
        * @see AbstractAnnotationValueVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public abstract class AbstractAnnotationValueVisitor14<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
      
           /**
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java   Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java   Fri Dec 06 21:39:33 2019 -0800
      @@ -73,7 +73,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public abstract class AbstractElementVisitor14<R, P> extends AbstractElementVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call.
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor14.java  Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor14.java  Fri Dec 06 21:39:33 2019 -0800
      @@ -62,7 +62,7 @@
        * @see AbstractTypeVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public abstract class AbstractTypeVisitor14<R, P> extends AbstractTypeVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call.
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java   Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java   Fri Dec 06 21:39:33 2019 -0800
      @@ -88,7 +88,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class ElementKindVisitor14<R, P> extends ElementKindVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java   Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java   Fri Dec 06 21:39:33 2019 -0800
      @@ -102,7 +102,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class ElementScanner14<R, P> extends ElementScanner9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor14.java Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor14.java Fri Dec 06 21:39:33 2019 -0800
      @@ -68,7 +68,7 @@
        * @see SimpleAnnotationValueVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class SimpleAnnotationValueVisitor14<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java Fri Dec 06 21:39:33 2019 -0800
      @@ -82,7 +82,7 @@
        */
       @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
                                    essentialAPI=false)
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class SimpleElementVisitor14<R, P> extends SimpleElementVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor14.java    Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor14.java    Fri Dec 06 21:39:33 2019 -0800
      @@ -72,7 +72,7 @@
        * @see SimpleTypeVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class SimpleTypeVisitor14<R, P> extends SimpleTypeVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses; uses {@code null} for the
      diff -r 01cb61a27e61 src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor14.java
      --- a/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor14.java  Fri Dec 06 13:32:46 2019 -0800
      +++ b/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor14.java  Fri Dec 06 21:39:33 2019 -0800
      @@ -77,7 +77,7 @@
        * @see TypeKindVisitor9
        * @since 14
        */
      -@SupportedSourceVersion(RELEASE_14)
      +@SupportedSourceVersion(RELEASE_15)
       public class TypeKindVisitor14<R, P> extends TypeKindVisitor9<R, P> {
           /**
            * Constructor for concrete subclasses to call; uses {@code null}

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

              Created:
              Updated:
              Resolved: