changeset 59066:89f7cdb265cf records

updating preview feature comment at TypeAnnotation
author vromero
date Tue, 03 Dec 2019 18:37:55 -0500
parents 57147b4485e1
children 6e321004dde1
files src/java.base/share/classes/sun/reflect/annotation/TypeAnnotation.java src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java
diffstat 3 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotation.java	Tue Dec 03 12:00:27 2019 -0500
+++ b/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotation.java	Tue Dec 03 18:37:55 2019 -0500
@@ -92,11 +92,16 @@
         METHOD_FORMAL_PARAMETER,
         THROWS,
         /**
-         * @deprecated This target is part of a preview feature and may be removed
-         * if the preview feature is removed.
+         * {@preview Associated with records, a preview feature of the Java language.
+         *
+         *           This enum constant is associated with <i>records</i>, a preview
+         *           feature of the Java language. Preview features
+         *           may be removed in a future release, or upgraded to permanent
+         *           features of the Java language.}
+         * @since 14
          */
-        @Deprecated(forRemoval=true, since="14")
-        @SuppressWarnings("removal")
+        @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+                                     essentialAPI=false)
         RECORD_COMPONENT;
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java	Tue Dec 03 12:00:27 2019 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java	Tue Dec 03 18:37:55 2019 -0500
@@ -660,6 +660,8 @@
          *
          * @since 14
          */
+        @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+                                     essentialAPI=false)
         RECORD(ClassTree.class),
 
         /**
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Tue Dec 03 12:00:27 2019 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Tue Dec 03 18:37:55 2019 -0500
@@ -786,6 +786,7 @@
         @Override
         public void accept(Visitor v) { v.visitClassDef(this); }
 
+        @SuppressWarnings("preview")
         @DefinedBy(Api.COMPILER_TREE)
         public Kind getKind() {
             if ((mods.flags & Flags.ANNOTATION) != 0)