--- old/make/CompileInterimLangtools.gmk 2019-10-25 17:12:37.000000000 +0100
+++ new/make/CompileInterimLangtools.gmk 2019-10-25 17:12:37.000000000 +0100
@@ -80,6 +80,7 @@
ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
$$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
--patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
+ --add-exports java.base/jdk.internal=java.compiler.interim \
--add-exports java.base/jdk.internal=jdk.compiler.interim \
-Xlint:-module, \
))
--- old/src/java.base/share/classes/module-info.java 2019-10-25 17:12:39.000000000 +0100
+++ new/src/java.base/share/classes/module-info.java 2019-10-25 17:12:39.000000000 +0100
@@ -137,6 +137,7 @@
exports com.sun.security.ntlm to
java.security.sasl;
exports jdk.internal to
+ java.compiler,
jdk.jfr,
jdk.compiler;
exports jdk.internal.access to
--- old/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java 2019-10-25 17:12:40.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/element/ElementKind.java 2019-10-25 17:12:40.000000000 +0100
@@ -110,23 +110,37 @@
MODULE,
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This constant is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A record type.
* @since 14
- * @deprecated This element kind is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
RECORD,
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This constant is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A record component of a {@code record}.
* @since 14
- * @deprecated This element kind is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
RECORD_COMPONENT;
/**
@@ -135,6 +149,7 @@
*
* @return {@code true} if this is a kind of class
*/
+ @SuppressWarnings("preview")
public boolean isClass() {
return this == CLASS || this == ENUM || this == RECORD;
}
--- old/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java 2019-10-25 17:12:42.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/element/ElementVisitor.java 2019-10-25 17:12:42.000000000 +0100
@@ -166,6 +166,14 @@
}
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Visits a record component element.
*
* @implSpec The default implementation visits a {@code
@@ -175,11 +183,10 @@
* @param p a visitor-specified parameter
* @return a visitor-specified result
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
default R visitRecordComponent(RecordComponentElement e, P p) {
return visitUnknown(e, p);
}
--- old/src/java.compiler/share/classes/javax/lang/model/element/RecordComponentElement.java 2019-10-25 17:12:43.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/element/RecordComponentElement.java 2019-10-25 17:12:43.000000000 +0100
@@ -26,14 +26,21 @@
package javax.lang.model.element;
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This class is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Represents a record component.
*
* @since 14
- * @deprecated This interface is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
-@Deprecated(forRemoval=true, since="14")
-@SuppressWarnings("removal")
+@jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+@SuppressWarnings("preview")
public interface RecordComponentElement extends Element {
/**
* Returns the enclosing element of this record component.
--- old/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java 2019-10-25 17:12:45.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/element/TypeElement.java 2019-10-25 17:12:45.000000000 +0100
@@ -179,6 +179,14 @@
List extends TypeParameterElement> getTypeParameters();
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Returns the record components of this type element in
* declaration order.
*
@@ -189,11 +197,10 @@
* none
*
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
default List extends RecordComponentElement> getRecordComponents() {
return List.of();
}
--- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java 2019-10-25 17:12:47.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor14.java 2019-10-25 17:12:47.000000000 +0100
@@ -31,6 +31,14 @@
import static javax.lang.model.SourceVersion.*;
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This class is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A skeletal visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_14 RELEASE_14}
* source version.
@@ -63,12 +71,11 @@
* @see AbstractElementVisitor8
* @see AbstractElementVisitor9
* @since 14
- * @deprecated This visitor is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
-@Deprecated(forRemoval=true, since="14")
+@jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+@SuppressWarnings("preview")
@SupportedSourceVersion(RELEASE_14)
-@SuppressWarnings("removal")
public abstract class AbstractElementVisitor14 extends AbstractElementVisitor9 {
/**
* Constructor for concrete subclasses to call.
--- old/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2019-10-25 17:12:48.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java 2019-10-25 17:12:48.000000000 +0100
@@ -157,7 +157,7 @@
*
* @since 14
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
@Override
public R visitRecordComponent(RecordComponentElement e, P p) {
// Use implementation from interface default method
--- old/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java 2019-10-25 17:12:50.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java 2019-10-25 17:12:50.000000000 +0100
@@ -79,7 +79,7 @@
private static final Set MODULE_KIND =
Collections.unmodifiableSet(EnumSet.of(ElementKind.MODULE));
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private static final Set TYPE_KINDS =
Collections.unmodifiableSet(EnumSet.of(ElementKind.CLASS,
ElementKind.ENUM,
@@ -87,7 +87,7 @@
ElementKind.RECORD,
ElementKind.ANNOTATION_TYPE));
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private static final Set RECORD_COMPONENT_KIND =
Set.of(ElementKind.RECORD_COMPONENT);
@@ -112,30 +112,44 @@
}
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Returns a list of record components in {@code elements}.
* @return a list of record components in {@code elements}
* @param elements the elements to filter
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
public static List
recordComponentsIn(Iterable extends Element> elements) {
return listFilter(elements, RECORD_COMPONENT_KIND, RecordComponentElement.class);
}
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Returns a set of record components in {@code elements}.
* @return a set of record components in {@code elements}
* @param elements the elements to filter
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
public static Set
recordComponentsIn(Set extends Element> elements) {
return setFilter(elements, RECORD_COMPONENT_KIND, RecordComponentElement.class);
--- old/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java 2019-10-25 17:12:52.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor14.java 2019-10-25 17:12:51.000000000 +0100
@@ -31,6 +31,14 @@
import javax.lang.model.SourceVersion;
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This class is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A visitor of program elements based on their {@linkplain
* ElementKind kind} with default behavior appropriate for the {@link
* SourceVersion#RELEASE_14 RELEASE_14} source version.
@@ -78,11 +86,10 @@
* @see ElementKindVisitor8
* @see ElementKindVisitor9
* @since 14
- * @deprecated This class is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
-@Deprecated(forRemoval=true, since="14")
-@SuppressWarnings("removal")
+@jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+@SuppressWarnings("preview")
@SupportedSourceVersion(RELEASE_14)
public class ElementKindVisitor14 extends ElementKindVisitor9 {
/**
--- old/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2019-10-25 17:12:53.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementKindVisitor6.java 2019-10-25 17:12:53.000000000 +0100
@@ -140,6 +140,7 @@
* @return the result of the kind-specific visit method
*/
@Override
+ @SuppressWarnings("preview")
public R visitType(TypeElement e, P p) {
ElementKind k = e.getKind();
switch(k) {
@@ -216,6 +217,14 @@
}
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Visits a {@code RECORD} type element.
*
* @implSpec This implementation calls {@code visitUnknown}.
@@ -225,11 +234,10 @@
* @return the result of {@code visitUnknown}
*
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
public R visitTypeAsRecord(TypeElement e, P p) {
return visitUnknown(e, p);
}
--- old/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java 2019-10-25 17:12:55.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/ElementScanner14.java 2019-10-25 17:12:55.000000000 +0100
@@ -31,6 +31,14 @@
import static javax.lang.model.SourceVersion.*;
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This class is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A scanning visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_14 RELEASE_14}
* source version.
@@ -90,11 +98,10 @@
* @see ElementScanner8
* @see ElementScanner9
* @since 14
- * @deprecated This class is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
-@Deprecated(forRemoval=true, since="14")
-@SuppressWarnings("removal")
+@jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+@SuppressWarnings("preview")
@SupportedSourceVersion(RELEASE_14)
public class ElementScanner14 extends ElementScanner9 {
/**
--- old/src/java.compiler/share/classes/javax/lang/model/util/Elements.java 2019-10-25 17:12:57.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/Elements.java 2019-10-25 17:12:56.000000000 +0100
@@ -632,17 +632,24 @@
boolean isFunctionalInterface(TypeElement type);
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This method is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* Returns the record component for the given accessor. Returns null if the
* given method is not a record component accessor.
*
* @param accessor the method for which the record component should be found.
* @return the record component, or null if the given method is not an record component accessor
* @since 14
- * @deprecated This method is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
- @Deprecated(forRemoval=true, since="14")
- @SuppressWarnings("removal")
+ @jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+ @SuppressWarnings("preview")
default RecordComponentElement recordComponentFor(ExecutableElement accessor) {
if (accessor.getEnclosingElement().getKind() == ElementKind.RECORD) {
for (RecordComponentElement rec : ElementFilter.recordComponentsIn(accessor.getEnclosingElement().getEnclosedElements())) {
--- old/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java 2019-10-25 17:12:58.000000000 +0100
+++ new/src/java.compiler/share/classes/javax/lang/model/util/SimpleElementVisitor14.java 2019-10-25 17:12:58.000000000 +0100
@@ -31,6 +31,14 @@
import static javax.lang.model.SourceVersion.*;
/**
+ * {@preview Associated with records, a preview feature of the Java language.
+ *
+ * This class is associated with records, a preview
+ * feature of the Java language. Programs can only use this
+ * method when preview features are enabled. Preview features
+ * may be removed in a future release, or upgraded to permanent
+ * features of the Java language.}
+ *
* A simple visitor of program elements with default behavior
* appropriate for the {@link SourceVersion#RELEASE_14 RELEASE_14}
* source version.
@@ -72,11 +80,10 @@
* @see SimpleElementVisitor8
* @see SimpleElementVisitor9
* @since 14
- * @deprecated This class is part of a preview feature and may be removed
- * if the preview feature is removed.
*/
-@Deprecated(forRemoval=true, since="14")
-@SuppressWarnings("removal")
+@jdk.internal.PreviewFeature(feature=jdk.internal.PreviewFeature.Feature.RECORDS,
+ essentialAPI=false)
+@SuppressWarnings("preview")
@SupportedSourceVersion(RELEASE_14)
public class SimpleElementVisitor14 extends SimpleElementVisitor9 {
/**
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java 2019-10-25 17:13:00.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java 2019-10-25 17:12:59.000000000 +0100
@@ -1456,7 +1456,7 @@
@DefinedBy(Api.LANGUAGE_MODEL)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public ElementKind getKind() {
apiComplete();
long flags = flags();
@@ -1493,7 +1493,7 @@
}
@Override @DefinedBy(Api.LANGUAGE_MODEL)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public List extends RecordComponent> getRecordComponents() {
return recordComponents;
}
@@ -1733,7 +1733,7 @@
}
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public static class RecordComponent extends VarSymbol implements RecordComponentElement {
/**
@@ -1744,7 +1744,7 @@
}
@Override @DefinedBy(Api.LANGUAGE_MODEL)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public ElementKind getKind() {
return ElementKind.RECORD_COMPONENT;
}
@@ -1755,7 +1755,7 @@
}
@Override @DefinedBy(Api.LANGUAGE_MODEL)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public R accept(ElementVisitor v, P p) {
return v.visitRecordComponent(this, p);
}
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java 2019-10-25 17:13:01.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java 2019-10-25 17:13:01.000000000 +0100
@@ -3219,7 +3219,7 @@
return targets;
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
boolean annotationApplicable(JCAnnotation a, Symbol s) {
Name[] targets = getTargetNames(a);
if (targets.length == 0) {
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java 2019-10-25 17:13:03.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java 2019-10-25 17:13:03.000000000 +0100
@@ -436,7 +436,7 @@
Type attribImportType(JCTree tree, Env env) {
Assert.check(completionEnabled);
Lint prevLint = chk.setLint(allowDeprecationOnImport ?
- lint : lint.suppress(LintCategory.DEPRECATION, LintCategory.REMOVAL));
+ lint : lint.suppress(LintCategory.DEPRECATION, LintCategory.REMOVAL, LintCategory.PREVIEW));
try {
// To prevent deep recursion, suppress completion of some
// types.
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java 2019-10-25 17:13:05.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java 2019-10-25 17:13:05.000000000 +0100
@@ -973,7 +973,7 @@
* Computes the set of annotations on the symbol in question.
* Leave class public for external testing purposes.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public static class ComputeAnnotationSet extends
ElementScanner14, Set> {
final Elements elements;
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java 2019-10-25 17:13:06.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java 2019-10-25 17:13:06.000000000 +0100
@@ -119,7 +119,7 @@
* or an empty set if there are none
*/
@DefinedBy(Api.ANNOTATION_PROCESSING)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public Set extends Element> getElementsAnnotatedWith(TypeElement a) {
throwIfNotAnnotation(a);
@@ -134,7 +134,7 @@
}
@DefinedBy(Api.ANNOTATION_PROCESSING)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public Set extends Element> getElementsAnnotatedWithAny(TypeElement... annotations) {
// Don't bother to special-case annotations.length == 1 as
// return getElementsAnnotatedWith(annotations[0]);
@@ -225,7 +225,7 @@
}
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private static abstract class ElementScanningIncludingTypeParameters
extends ElementScanner14 {
--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2019-10-25 17:13:08.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java 2019-10-25 17:13:08.000000000 +0100
@@ -90,7 +90,7 @@
/**
* Used for the -Xprint option and called by Elements.printElements
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public static class PrintingElementVisitor
extends SimpleElementVisitor14 {
int indentation; // Indentation level;
@@ -114,7 +114,7 @@
}
@Override @DefinedBy(Api.LANGUAGE_MODEL)
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public PrintingElementVisitor visitRecordComponent(RecordComponentElement e, Boolean p) {
// Do nothing; printing of component information done by
// printing the record type itself
--- old/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java 2019-10-25 17:13:09.000000000 +0100
+++ new/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java 2019-10-25 17:13:09.000000000 +0100
@@ -56,7 +56,7 @@
* This code and its internal interfaces are subject to change or
* deletion without notice.
*/
-@SuppressWarnings("removal")
+@SuppressWarnings("preview")
public class PubapiVisitor extends ElementScanner14 {
private PubApi collectedApi = new PubApi();
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java 2019-10-25 17:13:11.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java 2019-10-25 17:13:11.000000000 +0100
@@ -178,7 +178,7 @@
contentTree.add(heading);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
protected void addDescription(Content dl, Element element) {
SearchIndexItem si = new SearchIndexItem();
new SimpleElementVisitor14() {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java 2019-10-25 17:13:12.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java 2019-10-25 17:13:12.000000000 +0100
@@ -1661,7 +1661,7 @@
*
* @return the text, with all the relative links redirected to work.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private String redirectRelativeLinks(Element element, TextTree tt) {
String text = tt.getBody();
if (element == null || utils.isOverviewElement(element) || shouldNotRedirectRelativeLinks()) {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java 2019-10-25 17:13:14.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java 2019-10-25 17:13:14.000000000 +0100
@@ -197,7 +197,7 @@
/**
* {@inheritDoc}
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public Content paramTagOutput(Element element, DocTree paramTag, String paramName) {
ContentBuilder body = new ContentBuilder();
CommentHelper ch = utils.getCommentHelper(element);
@@ -420,7 +420,7 @@
return configuration;
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private Content createAnchorAndSearchIndex(Element element, String tagText, String desc){
Content result = null;
if (isFirstSentence && inSummary) {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java 2019-10-25 17:13:15.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseConfiguration.java 2019-10-25 17:13:15.000000000 +0100
@@ -1223,7 +1223,7 @@
* Splits the elements in a collection to its individual
* collection.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
static private class Splitter {
final Set mset = new LinkedHashSet<>();
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java 2019-10-25 17:13:17.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java 2019-10-25 17:13:16.000000000 +0100
@@ -197,7 +197,7 @@
* Generates the description for the standard {@code equals} method for a record.
* @param ee the {@code equals} method
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public void setRecordEqualsTree(ExecutableElement ee) {
List fullBody = new ArrayList<>();
add(fullBody, "doclet.record_equals_doc.fullbody.head");
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java 2019-10-25 17:13:18.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java 2019-10-25 17:13:18.000000000 +0100
@@ -453,7 +453,7 @@
* @param elem the record element
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private void setRecordDocumentation(TypeElement elem) {
CommentUtils cmtUtils = configuration.cmtUtils;
Set componentNames = elem.getRecordComponents().stream()
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java 2019-10-25 17:13:19.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java 2019-10-25 17:13:19.000000000 +0100
@@ -137,7 +137,7 @@
}
@Override
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public Content getTagletOutput(Element holder, TagletWriter writer) {
Utils utils = writer.configuration().utils;
if (utils.isExecutableElement(holder)) {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java 2019-10-25 17:13:21.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java 2019-10-25 17:13:21.000000000 +0100
@@ -333,7 +333,7 @@
* @param trees the trees containing the comments
* @param areInlineTags true if the array of tags are inline and false otherwise.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public void checkTags(Element element, Iterable extends DocTree> trees, boolean areInlineTags) {
if (trees == null) {
return;
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java 2019-10-25 17:13:22.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java 2019-10-25 17:13:22.000000000 +0100
@@ -483,7 +483,7 @@
private void mapTypeParameters(final Map> map,
Element element, final T holder) {
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
SimpleElementVisitor14 elementVisitor
= new SimpleElementVisitor14() {
@@ -561,7 +561,7 @@
* @param e whose type parameters are being checked.
* @param holder owning the type parameters.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private void mapAnnotations(final Map> map,
Element e, final T holder) {
new SimpleElementVisitor14() {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java 2019-10-25 17:13:24.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java 2019-10-25 17:13:23.000000000 +0100
@@ -302,7 +302,7 @@
return !e.getAnnotationMirrors().isEmpty();
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean isAnnotationType(Element e) {
return new SimpleElementVisitor14() {
@Override
@@ -418,12 +418,12 @@
return typeUtils.isSubtype(e.asType(), getExternalizableType());
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean isRecord(TypeElement e) {
return e.getKind() == ElementKind.RECORD;
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean isCanonicalRecordConstructor(ExecutableElement ee) {
TypeElement te = (TypeElement) ee.getEnclosingElement();
List extends RecordComponentElement> stateComps = te.getRecordComponents();
@@ -458,7 +458,7 @@
return configuration.workArounds.definesSerializableFields( aclass);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public String modifiersToString(Element e, boolean trailingSpace) {
SortedSet modifiers = new TreeSet<>(e.getModifiers());
modifiers.remove(NATIVE);
@@ -531,7 +531,7 @@
}
@Override
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public String visitTypeAsClass(TypeElement e, SortedSet mods) {
Set beforeSealed = EnumSet.noneOf(Modifier.class);
Set afterSealed = EnumSet.noneOf(Modifier.class);
@@ -1943,7 +1943,7 @@
return getFullyQualifiedName(e, true);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public String getFullyQualifiedName(Element e, final boolean outer) {
return new SimpleElementVisitor14() {
@Override
@@ -2118,7 +2118,7 @@
}
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
boolean hasParameters(Element e) {
return new SimpleElementVisitor14() {
@Override
@@ -2140,7 +2140,7 @@
* @return a negative integer, zero, or a positive integer as the first argument is less
* than, equal to, or greater than the second.
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private String getFullyQualifiedName(Element e) {
return new SimpleElementVisitor14() {
@Override
@@ -2252,12 +2252,12 @@
return convertToTypeElement(getItems(e, false, ANNOTATION_TYPE));
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public List getRecords(Element e) {
return convertToTypeElement(getItems(e, true, RECORD));
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public List getRecordsUnfiltered(Element e) {
return convertToTypeElement(getItems(e, false, RECORD));
}
@@ -2506,7 +2506,7 @@
.collect(Collectors.toList());
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
List getItems(Element e, boolean filter, ElementKind select) {
List elements = new ArrayList<>();
return new SimpleElementVisitor14, Void>() {
@@ -2554,10 +2554,10 @@
return elements;
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private SimpleElementVisitor14 shouldDocumentVisitor = null;
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean shouldDocument(Element e) {
if (shouldDocumentVisitor == null) {
shouldDocumentVisitor = new SimpleElementVisitor14() {
@@ -2610,10 +2610,10 @@
return nameCache.computeIfAbsent(e, this::getSimpleName0);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private SimpleElementVisitor14 snvisitor = null;
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private String getSimpleName0(Element e) {
if (snvisitor == null) {
snvisitor = new SimpleElementVisitor14() {
@@ -2797,9 +2797,9 @@
return configuration.docEnv.isIncluded(e);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private SimpleElementVisitor14 specifiedVisitor = null;
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean isSpecified(Element e) {
if (specifiedVisitor == null) {
specifiedVisitor = new SimpleElementVisitor14() {
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java 2019-10-25 17:13:25.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java 2019-10-25 17:13:25.000000000 +0100
@@ -700,7 +700,7 @@
}
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
String getMemberKey(Element e) {
return new SimpleElementVisitor14() {
@Override
--- old/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java 2019-10-25 17:13:26.000000000 +0100
+++ new/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ElementsTable.java 2019-10-25 17:13:26.000000000 +0100
@@ -985,7 +985,7 @@
return (xclasses || toolEnv.getFileKind(te) == SOURCE) && isSelected(te);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
SimpleElementVisitor14 visibleElementVisitor = null;
/**
* Returns true if the element is selected, by applying
@@ -997,7 +997,7 @@
* @param e the element to be checked
* @return true if the element is visible
*/
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
public boolean isSelected(Element e) {
if (toolEnv.isSynthetic((Symbol) e)) {
return false;
@@ -1037,7 +1037,7 @@
return visibleElementVisitor.visit(e);
}
- @SuppressWarnings("removal")
+ @SuppressWarnings("preview")
private class IncludedVisitor extends SimpleElementVisitor14 {
final private Set includedCache;