diff --git a/src/java.compiler/share/classes/javax/tools/Diagnostic.java b/src/java.compiler/share/classes/javax/tools/Diagnostic.java index 2440787b626..8c3c2a34c8a 100644 --- a/src/java.compiler/share/classes/javax/tools/Diagnostic.java +++ b/src/java.compiler/share/classes/javax/tools/Diagnostic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -89,7 +89,7 @@ public interface Diagnostic { /** * Used to signal that no position is available. */ - public final static long NOPOS = -1; + public static final long NOPOS = -1; /** * Returns the kind of this diagnostic, for example, error or 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 17dc60c1a88..a078fb6e22c 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 @@ -794,7 +794,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem /** A base class for Symbols representing types. */ - public static abstract class TypeSymbol extends Symbol { + public abstract static class TypeSymbol extends Symbol { public TypeSymbol(Kind kind, long flags, Name name, Type type, Symbol owner) { super(kind, flags, name, type, owner); } 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 c559f8c5be5..3cf34052300 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 @@ -241,7 +241,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons * of a given type expression. This mapping returns the original type is no changes occurred * when recursively mapping the original type's subterms. */ - public static abstract class StructuralTypeMapping extends Types.TypeMapping { + public abstract static class StructuralTypeMapping extends Types.TypeMapping { @Override public Type visitClassType(ClassType t, S s) { @@ -1786,7 +1786,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons } } - public static abstract class DelegatedType extends Type { + public abstract static class DelegatedType extends Type { public Type qtype; public TypeTag tag; 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 9d182a4c076..51926a70529 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 @@ -4896,7 +4896,7 @@ public class Types { * type itself) of the operation implemented by this visitor; use * Void if a second argument is not needed. */ - public static abstract class DefaultTypeVisitor implements Type.Visitor { + public abstract static class DefaultTypeVisitor implements Type.Visitor { public final R visit(Type t, S s) { return t.accept(this, s); } public R visitClassType(ClassType t, S s) { return visitType(t, s); } public R visitWildcardType(WildcardType t, S s) { return visitType(t, s); } @@ -4923,7 +4923,7 @@ public class Types { * symbol itself) of the operation implemented by this visitor; use * Void if a second argument is not needed. */ - public static abstract class DefaultSymbolVisitor implements Symbol.Visitor { + public abstract static class DefaultSymbolVisitor implements Symbol.Visitor { public final R visit(Symbol s, S arg) { return s.accept(this, arg); } public R visitClassSymbol(ClassSymbol s, S arg) { return visitSymbol(s, arg); } public R visitMethodSymbol(MethodSymbol s, S arg) { return visitSymbol(s, arg); } @@ -4946,7 +4946,7 @@ public class Types { * type itself) of the operation implemented by this visitor; use * Void if a second argument is not needed. */ - public static abstract class SimpleVisitor extends DefaultTypeVisitor { + public abstract static class SimpleVisitor extends DefaultTypeVisitor { @Override public R visitCapturedType(CapturedType t, S s) { return visitTypeVar(t, s); @@ -4966,7 +4966,7 @@ public class Types { * form Type × Type → Boolean. * */ - public static abstract class TypeRelation extends SimpleVisitor {} + public abstract static class TypeRelation extends SimpleVisitor {} /** * A convenience visitor for implementing operations that only @@ -4976,7 +4976,7 @@ public class Types { * @param the return type of the operation implemented by this * visitor; use Void if no return type is needed. */ - public static abstract class UnaryVisitor extends SimpleVisitor { + public abstract static class UnaryVisitor extends SimpleVisitor { public final R visit(Type t) { return t.accept(this, null); } } @@ -5041,7 +5041,7 @@ public class Types { // - public static abstract class SignatureGenerator { + public abstract static class SignatureGenerator { public static class InvalidSignatureException extends RuntimeException { private static final long serialVersionUID = 0; 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 d14756759b7..f4ba0f9bb17 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 @@ -341,7 +341,7 @@ public class Flow { * Base visitor class for all visitors implementing dataflow analysis logic. * This class define the shared logic for handling jumps (break/continue statements). */ - static abstract class BaseAnalyzer extends TreeScanner { + abstract static class BaseAnalyzer extends TreeScanner { enum JumpKind { BREAK(JCTree.Tag.BREAK) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JRTIndex.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JRTIndex.java index cc1568ad7da..eb6cd76d788 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JRTIndex.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JRTIndex.java @@ -56,7 +56,7 @@ import com.sun.tools.javac.util.Context; public class JRTIndex { /** Get a shared instance of the cache. */ private static JRTIndex sharedInstance; - public synchronized static JRTIndex getSharedInstance() { + public static synchronized JRTIndex getSharedInstance() { if (sharedInstance == null) { try { sharedInstance = new JRTIndex(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java index c539c72d627..f64f19c3054 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java @@ -444,7 +444,7 @@ public class Locations { * @see #initHandlers * @see #getHandler */ - protected static abstract class LocationHandler { + protected abstract static class LocationHandler { /** * @see JavaFileManager#handleOption @@ -513,7 +513,7 @@ public class Locations { /** * A LocationHandler for a given Location, and associated set of options. */ - private static abstract class BasicLocationHandler extends LocationHandler { + private abstract static class BasicLocationHandler extends LocationHandler { final Location location; final Set