JDK-8225363 : Add SourceVersion.RELEASE_14
  • Type: CSR
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 14
  • Submitted: 2019-06-05
  • Updated: 2019-06-10
  • Resolved: 2019-06-10
Related Reports
CSR :  
Description
Summary
-------

Add a new enum constant `RELEASE_14` to `javax.lang.model.SourceVersion` for the JDK 14 release and update the `FooVisitor9` visitors to cover release 14 as well.

Problem
-------

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

Solution
--------


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

Specification
-------------

    --- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	2019-05-17 09:42:41.520000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	2019-05-17 09:42:41.132000000 -0700
    @@ -192,7 +193,15 @@
          *
          * @since 13
          */
    -     RELEASE_13;
    +     RELEASE_13,
    +
    +    /**
    +     * The version recognized by the Java Platform, Standard Edition
    +     * 14.
    +     *
    +     * @since 14
    +     */
    +     RELEASE_14;

    --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	2019-05-17 09:42:42.628000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	2019-05-17 09:42:42.188000000 -0700
    @@ -32,7 +32,7 @@
     /**
      * A skeletal visitor for annotation values with default behavior
      * appropriate for source versions {@link SourceVersion#RELEASE_9
    - * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
      * implemented by this class may have methods added to it in the
    @@ -59,7 +59,7 @@
      * @see AbstractAnnotationValueVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
     
         /**
    --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	2019-05-17 09:42:43.988000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	2019-05-17 09:42:43.612000000 -0700
    @@ -34,7 +34,7 @@
     /**
      * A skeletal visitor of program elements with default behavior
      * appropriate for source versions {@link SourceVersion#RELEASE_9
    - * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
      * implemented by this class may have methods added to it in the
    @@ -65,7 +65,7 @@
      * @since 9
      * @spec JPMS
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses to call.
    --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	2019-05-17 09:42:45.356000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	2019-05-17 09:42:44.976000000 -0700
    @@ -33,7 +33,7 @@
     /**
      * A skeletal visitor of types with default behavior appropriate for
      * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through
    - * {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
      * by this class may have methods added to it in the future to
    @@ -63,7 +63,7 @@
      * @see AbstractTypeVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public abstract class AbstractTypeVisitor9<R, P> extends AbstractTypeVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses to call.
    --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java	2019-05-17 09:42:46.688000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java	2019-05-17 09:42:46.308000000 -0700
    @@ -34,7 +34,7 @@
      * A visitor of program elements based on their {@linkplain
      * ElementKind kind} with default behavior appropriate for source
      * versions {@link SourceVersion#RELEASE_9 RELEASE_9} through {@link
    - * SourceVersion#RELEASE_13 RELEASE_13}.
    + * SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * For {@linkplain
      * Element elements} <code><i>Xyz</i></code> that may have more than one
    @@ -80,7 +80,7 @@
      * @since 9
      * @spec JPMS
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
    --- old/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java	2019-05-17 09:42:48.016000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java	2019-05-17 09:42:47.640000000 -0700
    @@ -34,7 +34,7 @@
     /**
      * A scanning visitor of program elements with default behavior
      * appropriate for source versions {@link SourceVersion#RELEASE_9
    - * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * The <code>visit<i>Xyz</i></code> methods in this
      * class scan their component elements by calling {@code scan} on
    @@ -92,7 +92,7 @@
      * @since 9
      * @spec JPMS
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class ElementScanner9<R, P> extends ElementScanner8<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
    --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	2019-05-17 09:42:49.360000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	2019-05-17 09:42:48.960000000 -0700
    @@ -32,7 +32,7 @@
     /**
      * A simple visitor for annotation values with default behavior
      * appropriate for source versions {@link SourceVersion#RELEASE_9
    - * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * Visit methods call {@link #defaultAction
      * defaultAction} passing their arguments to {@code defaultAction}'s
    @@ -68,7 +68,7 @@
      * @see SimpleAnnotationValueVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class SimpleAnnotationValueVisitor9<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
    --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	2019-05-17 09:42:50.724000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	2019-05-17 09:42:50.320000000 -0700
    @@ -33,7 +33,7 @@
     /**
      * A simple visitor of program elements with default behavior
      * appropriate for source versions {@link SourceVersion#RELEASE_9
    - * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * Visit methods corresponding to {@code RELEASE_9} and earlier
      * language constructs call {@link #defaultAction defaultAction},
    @@ -73,7 +73,7 @@
      * @since 9
      * @spec JPMS
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class SimpleElementVisitor9<R, P> extends SimpleElementVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
    --- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	2019-05-17 09:42:52.188000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	2019-05-17 09:42:51.720000000 -0700
    @@ -33,7 +33,7 @@
     /**
      * A simple visitor of types with default behavior appropriate for
      * source versions {@link SourceVersion#RELEASE_9 RELEASE_9} through
    - * {@link SourceVersion#RELEASE_13 RELEASE_13}.
    + * {@link SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * Visit methods corresponding to {@code RELEASE_9} and earlier
      * language constructs call {@link #defaultAction defaultAction},
    @@ -73,7 +73,7 @@
      * @see SimpleTypeVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class SimpleTypeVisitor9<R, P> extends SimpleTypeVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
    --- old/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java	2019-05-17 09:42:53.676000000 -0700
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java	2019-05-17 09:42:53.236000000 -0700
    @@ -34,7 +34,7 @@
      * A visitor of types based on their {@linkplain TypeKind kind} with
      * default behavior appropriate for source versions {@link
      * SourceVersion#RELEASE_9 RELEASE_9} through {@link
    - * SourceVersion#RELEASE_13 RELEASE_13}.
    + * SourceVersion#RELEASE_14 RELEASE_14}.
      *
      * For {@linkplain
      * TypeMirror types} <code><i>Xyz</i></code> that may have more than one
    @@ -77,7 +77,7 @@
      * @see TypeKindVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_13)
    +@SupportedSourceVersion(RELEASE_14)
     public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}
Comments
Moving to Approved.
10-06-2019