From c396f1ed8b91b799fdd6a9a849d7407e606227d5 Mon Sep 17 00:00:00 2001 From: "Archie L. Cobbs" Date: Mon, 20 Mar 2023 14:33:16 +0000 Subject: [PATCH] 8304443: bootcycle builds fail after JDK-8015831 Reviewed-by: vromero --- .../share/classes/jdk/internal/jimage/BasicImageReader.java | 2 +- .../classes/com/sun/tools/javac/api/BasicJavacTask.java | 1 + .../share/classes/com/sun/tools/javac/api/JavacTrees.java | 1 + .../classes/com/sun/tools/javac/api/MultiTaskListener.java | 1 + .../share/classes/com/sun/tools/javac/code/ClassFinder.java | 1 + .../tools/javac/code/DeferredCompletionFailureHandler.java | 1 + .../com/sun/tools/javac/code/DeferredLintHandler.java | 1 + .../share/classes/com/sun/tools/javac/code/Lint.java | 1 + .../classes/com/sun/tools/javac/code/MissingInfoHandler.java | 1 + .../share/classes/com/sun/tools/javac/code/ModuleFinder.java | 1 + .../share/classes/com/sun/tools/javac/code/Symbol.java | 2 ++ .../share/classes/com/sun/tools/javac/code/Symtab.java | 1 + .../share/classes/com/sun/tools/javac/code/Type.java | 4 ++++ .../classes/com/sun/tools/javac/code/TypeAnnotations.java | 1 + .../share/classes/com/sun/tools/javac/code/Types.java | 1 + .../share/classes/com/sun/tools/javac/comp/Analyzer.java | 1 + .../share/classes/com/sun/tools/javac/comp/Annotate.java | 1 + .../share/classes/com/sun/tools/javac/comp/ArgumentAttr.java | 1 + .../share/classes/com/sun/tools/javac/comp/Attr.java | 1 + .../share/classes/com/sun/tools/javac/comp/AttrRecover.java | 1 + .../share/classes/com/sun/tools/javac/comp/Check.java | 1 + .../classes/com/sun/tools/javac/comp/CompileStates.java | 1 + .../share/classes/com/sun/tools/javac/comp/DeferredAttr.java | 1 + .../share/classes/com/sun/tools/javac/comp/Enter.java | 1 + .../share/classes/com/sun/tools/javac/comp/Flow.java | 1 + .../share/classes/com/sun/tools/javac/comp/Infer.java | 1 + .../share/classes/com/sun/tools/javac/comp/Lower.java | 1 + .../share/classes/com/sun/tools/javac/comp/MemberEnter.java | 1 + .../share/classes/com/sun/tools/javac/comp/Modules.java | 1 + .../share/classes/com/sun/tools/javac/comp/Operators.java | 1 + .../share/classes/com/sun/tools/javac/comp/Resolve.java | 1 + .../share/classes/com/sun/tools/javac/comp/Todo.java | 1 + .../classes/com/sun/tools/javac/comp/TransPatterns.java | 1 + .../share/classes/com/sun/tools/javac/comp/TransTypes.java | 1 + .../share/classes/com/sun/tools/javac/comp/TypeEnter.java | 1 + .../classes/com/sun/tools/javac/file/BaseFileManager.java | 1 + .../share/classes/com/sun/tools/javac/file/FSInfo.java | 1 + .../classes/com/sun/tools/javac/file/JavacFileManager.java | 1 + .../share/classes/com/sun/tools/javac/jvm/ClassReader.java | 1 + .../share/classes/com/sun/tools/javac/jvm/ClassWriter.java | 1 + .../share/classes/com/sun/tools/javac/jvm/Gen.java | 1 + .../share/classes/com/sun/tools/javac/jvm/StringConcat.java | 1 + .../share/classes/com/sun/tools/javac/main/Arguments.java | 1 + .../share/classes/com/sun/tools/javac/main/JavaCompiler.java | 1 + .../classes/com/sun/tools/javac/model/JavacElements.java | 1 + .../share/classes/com/sun/tools/javac/model/JavacTypes.java | 1 + .../classes/com/sun/tools/javac/parser/JavacParser.java | 1 + .../classes/com/sun/tools/javac/parser/ParserFactory.java | 1 + .../classes/com/sun/tools/javac/parser/ScannerFactory.java | 1 + .../share/classes/com/sun/tools/javac/parser/Tokens.java | 1 + .../classes/com/sun/tools/javac/parser/UnicodeReader.java | 1 + .../share/classes/com/sun/tools/javac/tree/DocTreeMaker.java | 1 + .../share/classes/com/sun/tools/javac/tree/TreeMaker.java | 1 + .../sun/tools/javac/util/AbstractDiagnosticFormatter.java | 3 ++- .../com/sun/tools/javac/util/BasicDiagnosticFormatter.java | 3 ++- .../share/classes/com/sun/tools/javac/util/Dependencies.java | 1 + .../share/classes/com/sun/tools/javac/util/JCDiagnostic.java | 1 + .../classes/com/sun/tools/javac/util/JavacMessages.java | 2 ++ .../share/classes/com/sun/tools/javac/util/Log.java | 5 +++++ .../share/classes/com/sun/tools/javac/util/Names.java | 1 + .../share/classes/com/sun/tools/javac/util/Options.java | 1 + .../com/sun/tools/javac/util/RichDiagnosticFormatter.java | 1 + .../share/classes/jdk/javadoc/doclet/StandardDoclet.java | 1 + 63 files changed, 74 insertions(+), 3 deletions(-) diff --git a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java index 7796512a715..07879353d90 100644 --- a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java +++ b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java @@ -82,7 +82,7 @@ public class BasicImageReader implements AutoCloseable { private final ImageStringsReader stringsReader; private final Decompressor decompressor; - @SuppressWarnings("removal") + @SuppressWarnings({ "removal", "this-escape" }) protected BasicImageReader(Path path, ByteOrder byteOrder) throws IOException { this.imagePath = Objects.requireNonNull(path); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java index 74c15dcd416..8bad3f64c38 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java @@ -86,6 +86,7 @@ public class BasicJavacTask extends JavacTask { return instance; } + @SuppressWarnings("this-escape") public BasicJavacTask(Context c, boolean register) { context = c; options = Options.instance(c); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java index 888a5b1a9ac..6f04035b526 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java @@ -198,6 +198,7 @@ public class JavacTrees extends DocTrees { return instance; } + @SuppressWarnings("this-escape") protected JavacTrees(Context context) { this.breakIterator = null; context.put(JavacTrees.class, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java index 7d5510ed483..26038e4a14e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java @@ -62,6 +62,7 @@ public class MultiTaskListener implements TaskListener { return instance; } + @SuppressWarnings("this-escape") protected MultiTaskListener(Context context) { context.put(taskListenerKey, this); ccw = ClientCodeWrapper.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java index 21a29ac8e82..770adbebc2e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java @@ -180,6 +180,7 @@ public class ClassFinder { } /** Construct a new class finder. */ + @SuppressWarnings("this-escape") protected ClassFinder(Context context) { context.put(classFinderKey, this); reader = ClassReader.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredCompletionFailureHandler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredCompletionFailureHandler.java index 12d4b1a1374..db4367c5e17 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredCompletionFailureHandler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredCompletionFailureHandler.java @@ -120,6 +120,7 @@ public class DeferredCompletionFailureHandler { private Handler handler = javacCodeHandler; + @SuppressWarnings("this-escape") protected DeferredCompletionFailureHandler(Context context) { context.put(deferredCompletionFailureHandlerKey, this); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java index 37e22c709ea..94d121ad04d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java @@ -52,6 +52,7 @@ public class DeferredLintHandler { return instance; } + @SuppressWarnings("this-escape") protected DeferredLintHandler(Context context) { context.put(deferredLintHandlerKey, this); this.currentPos = IMMEDIATE_POSITION; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java index fe65976488e..137c46c6439 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java @@ -100,6 +100,7 @@ public class Lint private static final Map map = new ConcurrentHashMap<>(20); + @SuppressWarnings("this-escape") protected Lint(Context context) { // initialize values according to the lint options Options options = Options.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/MissingInfoHandler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/MissingInfoHandler.java index 088df917df7..199f6777811 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/MissingInfoHandler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/MissingInfoHandler.java @@ -53,6 +53,7 @@ public class MissingInfoHandler { private final Names names; private ParameterNameProvider parameterNameProvider; + @SuppressWarnings("this-escape") protected MissingInfoHandler(Context context) { context.put(missingInfoHandlerWrapperKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java index 62bbbdf8bd0..866d44730b8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java @@ -104,6 +104,7 @@ public class ModuleFinder { } /** Construct a new module finder. */ + @SuppressWarnings("this-escape") protected ModuleFinder(Context context) { context.put(moduleFinderKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java index f3d3ca80c0e..8ec35ff7ccc 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java @@ -1000,6 +1000,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem return msym; } + @SuppressWarnings("this-escape") public ModuleSymbol(Name name, Symbol owner) { super(MDL, 0, name, null, owner); Assert.checkNonNull(name); @@ -1153,6 +1154,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem this.fullname = formFullName(name, owner); } + @SuppressWarnings("this-escape") public PackageSymbol(Name name, Symbol owner) { this(name, null, owner); this.type = new PackageType(this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java index 6d088750cac..a01f95190c2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java @@ -392,6 +392,7 @@ public class Symtab { /** Constructor; enters all predefined identifiers and operators * into symbol table. */ + @SuppressWarnings("this-escape") protected Symtab(Context context) throws CompletionFailure { context.put(symtabKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java index 9c7663ec852..ebb188442e9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java @@ -1646,6 +1646,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons */ public Type lower; + @SuppressWarnings("this-escape") public TypeVar(Name name, Symbol owner, Type lower) { super(null, List.nil()); Assert.checkNonNull(lower); @@ -1658,6 +1659,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons this(tsym, bound, lower, List.nil()); } + @SuppressWarnings("this-escape") public TypeVar(TypeSymbol tsym, Type bound, Type lower, List metadata) { super(tsym, metadata); @@ -1734,6 +1736,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons public WildcardType wildcard; + @SuppressWarnings("this-escape") public CapturedType(Name name, Symbol owner, Type upper, @@ -1967,6 +1970,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons return v.visitUndetVar(this, s); } + @SuppressWarnings("this-escape") public UndetVar(TypeVar origin, UndetVarListener listener, Types types) { // This is a synthesized internal type, so we cannot annotate it. super(UNDETVAR, origin); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java index 1b4bc7e6706..0e573844232 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java @@ -110,6 +110,7 @@ public class TypeAnnotations { final Annotate annotate; final Attr attr; + @SuppressWarnings("this-escape") protected TypeAnnotations(Context context) { context.put(typeAnnosKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java index 8be952f26af..f584ac2fd40 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java @@ -108,6 +108,7 @@ public class Types { return instance; } + @SuppressWarnings("this-escape") protected Types(Context context) { context.put(typesKey, this); syms = Symtab.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java index 3721cd6a505..894906e825c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java @@ -119,6 +119,7 @@ public class Analyzer { return instance; } + @SuppressWarnings("this-escape") protected Analyzer(Context context) { context.put(analyzerKey, this); types = Types.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java index b45500b7c5a..426d74261e5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java @@ -103,6 +103,7 @@ public class Annotate { private final Attribute theUnfinishedDefaultValue; private final String sourceName; + @SuppressWarnings("this-escape") protected Annotate(Context context) { context.put(annotateKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java index 99d0cae240e..9b78a02170c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java @@ -120,6 +120,7 @@ public class ArgumentAttr extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected ArgumentAttr(Context context) { context.put(methodAttrKey, this); deferredAttr = DeferredAttr.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index aba09e28590..051aadd09e1 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -132,6 +132,7 @@ public class Attr extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected Attr(Context context) { context.put(attrKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java index 98bc9eb4ac3..40a4e3a88fc 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java @@ -79,6 +79,7 @@ public class AttrRecover { return instance; } + @SuppressWarnings("this-escape") protected AttrRecover(Context context) { context.put(attrRepairKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java index 598ab23a99c..aad1d8dc27a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java @@ -133,6 +133,7 @@ public class Check { return instance; } + @SuppressWarnings("this-escape") protected Check(Context context) { context.put(checkKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java index 2b52e839edf..b044f956fdf 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java @@ -80,6 +80,7 @@ public class CompileStates extends HashMap, CompileStates.Compi protected transient Context context; + @SuppressWarnings("this-escape") public CompileStates(Context context) { this.context = context; context.put(compileStatesKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java index 965e677a931..bc43c427a34 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java @@ -109,6 +109,7 @@ public class DeferredAttr extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected DeferredAttr(Context context) { context.put(deferredAttrKey, this); annotate = Annotate.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java index 01245b24af7..808d4bb294f 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java @@ -114,6 +114,7 @@ public class Enter extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected Enter(Context context) { context.put(enterKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java index 7c3264c0594..35096c89083 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java @@ -325,6 +325,7 @@ public class Flow { } } + @SuppressWarnings("this-escape") protected Flow(Context context) { context.put(flowKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java index f8725b95186..e3e7e1adea5 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java @@ -104,6 +104,7 @@ public class Infer { return instance; } + @SuppressWarnings("this-escape") protected Infer(Context context) { context.put(inferKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java index 17493b86ac5..e85ff30ea40 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java @@ -104,6 +104,7 @@ public class Lower extends TreeTranslator { private final boolean optimizeOuterThis; private final boolean useMatchException; + @SuppressWarnings("this-escape") protected Lower(Context context) { context.put(lowerKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java index 41910a26f82..1ccbbb8fc97 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java @@ -71,6 +71,7 @@ public class MemberEnter extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected MemberEnter(Context context) { context.put(memberEnterKey, this); enter = Enter.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java index c508f6e6daf..f92497562cd 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java @@ -181,6 +181,7 @@ public class Modules extends JCTree.Visitor { return instance; } + @SuppressWarnings("this-escape") protected Modules(Context context) { context.put(Modules.class, this); log = Log.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java index 6ca0578339d..ee487f2a034 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Operators.java @@ -89,6 +89,7 @@ public class Operators { return instance; } + @SuppressWarnings("this-escape") protected Operators(Context context) { context.put(operatorsKey, this); syms = Symtab.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index c79903b7e1a..0789e9aed65 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -116,6 +116,7 @@ public class Resolve { WriteableScope polymorphicSignatureScope; + @SuppressWarnings("this-escape") protected Resolve(Context context) { context.put(resolveKey, this); syms = Symtab.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Todo.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Todo.java index eaeef343370..c8873c8cbb1 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Todo.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Todo.java @@ -56,6 +56,7 @@ public class Todo extends AbstractQueue> { } /** Create a new todo list. */ + @SuppressWarnings("this-escape") protected Todo(Context context) { context.put(todoKey, this); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java index d6070c86ec8..aba441fdc82 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java @@ -179,6 +179,7 @@ public class TransPatterns extends TreeTranslator { private Set deconstructorCalls; private int variableIndex = 0; + @SuppressWarnings("this-escape") protected TransPatterns(Context context) { context.put(transPatternsKey, this); syms = Symtab.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java index 4ed244fd88a..4e5d7cc4b8c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java @@ -76,6 +76,7 @@ public class TransTypes extends TreeTranslator { private final Resolve resolve; private final CompileStates compileStates; + @SuppressWarnings("this-escape") protected TransTypes(Context context) { context.put(transTypesKey, this); compileStates = CompileStates.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java index 7118860e872..19d9dea772b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java @@ -122,6 +122,7 @@ public class TypeEnter implements Completer { return instance; } + @SuppressWarnings("this-escape") protected TypeEnter(Context context) { context.put(typeEnterKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java index dc9516b7f6d..bbc684404b8 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java @@ -71,6 +71,7 @@ import com.sun.tools.javac.util.Options; * java.io.File or java.nio.file.Path. */ public abstract class BaseFileManager implements JavaFileManager { + @SuppressWarnings("this-escape") protected BaseFileManager(Charset charset) { this.charset = charset; byteBufferCache = new ByteBufferCache(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java index 9a0402aae34..e2ab9b1679c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/FSInfo.java @@ -70,6 +70,7 @@ public class FSInfo { protected FSInfo() { } + @SuppressWarnings("this-escape") protected FSInfo(Context context) { context.put(FSInfo.class, this); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java index 7c40afb62af..5c1bc5101f0 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java @@ -157,6 +157,7 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil * Create a JavacFileManager using a given context, optionally registering * it as the JavaFileManager for that context. */ + @SuppressWarnings("this-escape") public JavacFileManager(Context context, boolean register, Charset charset) { super(charset); if (register) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java index e8c47137d0c..8a5458f74d2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java @@ -258,6 +258,7 @@ public class ClassReader { } /** Construct a new class reader. */ + @SuppressWarnings("this-escape") protected ClassReader(Context context) { context.put(classReaderKey, this); annotate = Annotate.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java index ff13a6a7362..8cf4e8f1486 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java @@ -164,6 +164,7 @@ public class ClassWriter extends ClassFile { /** Construct a class writer, given an options table. */ + @SuppressWarnings("this-escape") protected ClassWriter(Context context) { context.put(classWriterKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java index 6f58c8b4f81..f216a910813 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -97,6 +97,7 @@ public class Gen extends JCTree.Visitor { */ final PoolWriter poolWriter; + @SuppressWarnings("this-escape") protected Gen(Context context) { context.put(genKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java index edb41fc2faf..182efc63dc7 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java @@ -105,6 +105,7 @@ public abstract class StringConcat { } } + @SuppressWarnings("this-escape") protected StringConcat(Context context) { context.put(concatKey, this); gen = Gen.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java index f29e4a8404a..c5f93566285 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java @@ -114,6 +114,7 @@ public class Arguments { return instance; } + @SuppressWarnings("this-escape") protected Arguments(Context context) { context.put(argsKey, this); options = Options.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java index 387b34533e0..c9ba28d09f2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java @@ -371,6 +371,7 @@ public class JavaCompiler { /** Construct a new compiler using a shared context. */ + @SuppressWarnings("this-escape") public JavaCompiler(Context context) { this.context = context; context.put(compilerKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java index 0e87baa7fe9..0c0bb4a6959 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java @@ -105,6 +105,7 @@ public class JavacElements implements Elements { return instance; } + @SuppressWarnings("this-escape") protected JavacElements(Context context) { context.put(JavacElements.class, this); javaCompiler = JavaCompiler.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java index 88fd30d5bd7..08d5e785a3c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java @@ -63,6 +63,7 @@ public class JavacTypes implements javax.lang.model.util.Types { return instance; } + @SuppressWarnings("this-escape") protected JavacTypes(Context context) { context.put(JavacTypes.class, this); syms = Symtab.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java index 8389e35b5c4..661cf06d30f 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -166,6 +166,7 @@ public class JavacParser implements Parser { } /** Construct a parser from a given scanner, tree factory and log. */ + @SuppressWarnings("this-escape") protected JavacParser(ParserFactory fac, Lexer S, boolean keepDocComments, diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java index e699a81d7b2..d27a785e363 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ParserFactory.java @@ -69,6 +69,7 @@ public class ParserFactory { final ScannerFactory scannerFactory; final Locale locale; + @SuppressWarnings("this-escape") protected ParserFactory(Context context) { super(); context.put(parserFactoryKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ScannerFactory.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ScannerFactory.java index 92eb8e76c31..90188eaafea 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ScannerFactory.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ScannerFactory.java @@ -63,6 +63,7 @@ public class ScannerFactory { final Lint lint; /** Create a new scanner factory. */ + @SuppressWarnings("this-escape") protected ScannerFactory(Context context) { context.put(scannerFactoryKey, this); this.log = Log.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java index 31686282752..c5924c44aa3 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java @@ -61,6 +61,7 @@ public class Tokens { return instance; } + @SuppressWarnings("this-escape") protected Tokens(Context context) { context.put(tokensKey, this); names = Names.instance(context); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java index 5f7a1fc17b2..c21d08e9d86 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java @@ -102,6 +102,7 @@ public class UnicodeReader { * @param array array containing contents of source. * @param length length of meaningful content in buffer. */ + @SuppressWarnings("this-escape") protected UnicodeReader(ScannerFactory sf, char[] array, int length) { this.buffer = array; this.length = length; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java index 81b9ac992c7..e45b84dbd68 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java @@ -133,6 +133,7 @@ public class DocTreeMaker implements DocTreeFactory { /** Create a tree maker with NOPOS as initial position. */ + @SuppressWarnings("this-escape") protected DocTreeMaker(Context context) { context.put(treeMakerKey, this); this.pos = Position.NOPOS; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java index 43816c68435..e8522c0cfcd 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java @@ -80,6 +80,7 @@ public class TreeMaker implements JCTree.Factory { /** Create a tree maker with null toplevel and NOPOS as initial position. */ + @SuppressWarnings("this-escape") protected TreeMaker(Context context) { context.put(treeMakerKey, this); this.pos = Position.NOPOS; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java index 91fba064fb9..fc33c895fb2 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java @@ -411,6 +411,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter protected EnumSet visibleParts; protected boolean caretEnabled; + @SuppressWarnings("this-escape") public SimpleConfiguration(Set parts) { multilineLimits = new HashMap<>(); setVisible(parts); @@ -419,7 +420,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter setCaretEnabled(true); } - @SuppressWarnings("fallthrough") + @SuppressWarnings({ "fallthrough", "this-escape" }) public SimpleConfiguration(Options options, Set parts) { this(parts); String showSource = null; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java index 226c73d504a..b6660571442 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java @@ -221,7 +221,7 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter { protected Map availableFormats; protected SourcePosition sourcePosition; - @SuppressWarnings("fallthrough") + @SuppressWarnings({ "fallthrough", "this-escape" }) public BasicConfiguration(Options options) { super(options, EnumSet.of(DiagnosticPart.SUMMARY, DiagnosticPart.DETAILS, @@ -272,6 +272,7 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter { } } + @SuppressWarnings("this-escape") public BasicConfiguration() { super(EnumSet.of(DiagnosticPart.SUMMARY, DiagnosticPart.DETAILS, diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java index 3396d0f3a2a..48f29c2a194 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Dependencies.java @@ -71,6 +71,7 @@ public abstract class Dependencies { return instance; } + @SuppressWarnings("this-escape") protected Dependencies(Context context) { context.put(dependenciesKey, this); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java index 272f61be7f2..2e9394c0bd4 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java @@ -68,6 +68,7 @@ public class JCDiagnostic implements Diagnostic { final Set defaultErrorFlags; /** Create a new diagnostic factory. */ + @SuppressWarnings("this-escape") protected Factory(Context context) { this(JavacMessages.instance(context), "compiler"); context.put(diagnosticFactoryKey, this); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java index de4444e98ba..3e30f03644e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavacMessages.java @@ -85,6 +85,7 @@ public class JavacMessages implements Messages { /** Creates a JavacMessages object. */ + @SuppressWarnings("this-escape") public JavacMessages(Context context) { this(defaultBundleName, context.get(Locale.class)); this.context = context; @@ -105,6 +106,7 @@ public class JavacMessages implements Messages { /** Creates a JavacMessages object. * @param bundleName the name to identify the resource bundle of localized messages. */ + @SuppressWarnings("this-escape") public JavacMessages(String bundleName, Locale locale) throws MissingResourceException { bundleHelpers = List.nil(); bundleCache = new HashMap<>(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java index c1d1b22fa01..2b21dda0545 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java @@ -114,6 +114,7 @@ public class Log extends AbstractLog { * A DiagnosticHandler that discards all diagnostics. */ public static class DiscardDiagnosticHandler extends DiagnosticHandler { + @SuppressWarnings("this-escape") public DiscardDiagnosticHandler(Log log) { install(log); } @@ -137,6 +138,7 @@ public class Log extends AbstractLog { this(log, null); } + @SuppressWarnings("this-escape") public DeferredDiagnosticHandler(Log log, Predicate filter) { this.filter = filter; install(log); @@ -251,6 +253,7 @@ public class Log extends AbstractLog { * it will be used for all output. * Otherwise, the log will be initialized to use both streams found in the context. */ + @SuppressWarnings("this-escape") protected Log(Context context) { this(context, initWriters(context)); } @@ -278,6 +281,7 @@ public class Log extends AbstractLog { /** * Construct a log with all output sent to a single output stream. */ + @SuppressWarnings("this-escape") protected Log(Context context, PrintWriter writer) { this(context, initWriters(writer, writer)); } @@ -287,6 +291,7 @@ public class Log extends AbstractLog { * The log will be initialized to use stdOut for normal output, and stdErr * for all diagnostic output. */ + @SuppressWarnings("this-escape") protected Log(Context context, PrintWriter out, PrintWriter err) { this(context, initWriters(out, err)); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java index b25201fa322..e4efe500e71 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java @@ -224,6 +224,7 @@ public class Names { public final Name.Table table; + @SuppressWarnings("this-escape") public Names(Context context) { Options options = Options.instance(context); table = createTable(options); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java index 1d5ae085fb8..1eafa9d690a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java @@ -55,6 +55,7 @@ public class Options { return instance; } + @SuppressWarnings("this-escape") protected Options(Context context) { // DEBUGGING -- Use LinkedHashMap for reproducibility values = new LinkedHashMap<>(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java index d83692c4897..e1faa02bd38 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java @@ -94,6 +94,7 @@ public class RichDiagnosticFormatter extends return instance; } + @SuppressWarnings("this-escape") protected RichDiagnosticFormatter(Context context) { super((AbstractDiagnosticFormatter)Log.instance(context).getDiagnosticFormatter()); setRichPrinter(new RichPrinter()); diff --git a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java index c57f0d9643e..819c39fe0b6 100644 --- a/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java @@ -74,6 +74,7 @@ public class StandardDoclet implements Doclet { * Creates an instance of the standard doclet, used to generate HTML-formatted * documentation. */ + @SuppressWarnings("this-escape") public StandardDoclet() { htmlDoclet = new HtmlDoclet(this); }