JDK-8205395 : Add SourceVersion.RELEASE_13
  • Type: CSR
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P4
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 13
  • Submitted: 2018-06-19
  • Updated: 2018-11-30
  • Resolved: 2018-11-30
Related Reports
CSR :  
Relates :  
Description
Summary
-------

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

Problem
-------

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

Solution
--------

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


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

    --- old/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	2018-11-29 22:50:47.272212000 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/SourceVersion.java	2018-11-29 
         /**
    @@ -183,7 +184,15 @@
          *
          * @since 12
          */
    -     RELEASE_12;
    +     RELEASE_12,
    +
    +    /**
    +     * The version recognized by the Java Platform, Standard Edition
    +     * 13.
    +     *
    +     * @since 13
    +     */
    +     RELEASE_13;
     --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	2018-11-29 22:50:47.776463999 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	2018-11-29 22:50:47.604377999 -0800
    @@ -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_12 RELEASE_12}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * <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_12)
    +@SupportedSourceVersion(RELEASE_13)
     public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
     
         /**
    --- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	2018-11-29 22:50:48.432791999 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	2018-11-29 22:50:48.260706000 -0800
    @@ -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_12 RELEASE_12}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * <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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:49.065108000 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	2018-11-29 22:50:48.897024000 -0800
    @@ -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_12 RELEASE_12}.
    + * {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * <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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:49.705428000 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor9.java	2018-11-29 22:50:49.533342000 -0800
    @@ -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_12 RELEASE_12}.
    + * SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * 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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:50.345748000 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner9.java	2018-11-29 22:50:50.173661999 -0800
    @@ -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_12 RELEASE_12}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * 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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:50.978063999 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	2018-11-29 22:50:50.805977999 -0800
    @@ -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_12 RELEASE_12}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * Visit methods call {@link #defaultAction
      * defaultAction} passing their arguments to {@code defaultAction}'s
    @@ -68,7 +68,7 @@
      * @see SimpleAnnotationValueVisitor8
      * @since 9
      */
    -@SupportedSourceVersion(RELEASE_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:51.626388000 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	2018-11-29 22:50:51.450299999 -0800
    @@ -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_12 RELEASE_12}.
    + * RELEASE_9} through {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * 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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:52.262705999 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	2018-11-29 22:50:52.090620000 -0800
    @@ -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_12 RELEASE_12}.
    + * {@link SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * 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_12)
    +@SupportedSourceVersion(RELEASE_13)
     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	2018-11-29 22:50:52.911029999 -0800
    +++ new/src/java.compiler/share/classes/javax/lang/model/util/TypeKindVisitor9.java	2018-11-29 22:50:52.722936000 -0800
    @@ -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_12 RELEASE_12}.
    + * SourceVersion#RELEASE_13 RELEASE_13}.
      *
      * 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_12)
    +@SupportedSourceVersion(RELEASE_13)
     public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}


Comments
Moving to Approved.
30-11-2018