Skip to content

Commit 0616d86

Browse files
committed
8276635: Use blessed modifier order in compiler code
Reviewed-by: darcy
1 parent d95299a commit 0616d86

19 files changed

Lines changed: 43 additions & 43 deletions

File tree

src/java.compiler/share/classes/javax/tools/Diagnostic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,7 @@ enum Kind {
8989
/**
9090
* Used to signal that no position is available.
9191
*/
92-
public final static long NOPOS = -1;
92+
public static final long NOPOS = -1;
9393

9494
/**
9595
* Returns the kind of this diagnostic, for example, error or

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ public T getUnderlyingSymbol() {
794794

795795
/** A base class for Symbols representing types.
796796
*/
797-
public static abstract class TypeSymbol extends Symbol {
797+
public abstract static class TypeSymbol extends Symbol {
798798
public TypeSymbol(Kind kind, long flags, Name name, Type type, Symbol owner) {
799799
super(kind, flags, name, type, owner);
800800
}

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public Type(TypeSymbol tsym, TypeMetadata metadata) {
241241
* of a given type expression. This mapping returns the original type is no changes occurred
242242
* when recursively mapping the original type's subterms.
243243
*/
244-
public static abstract class StructuralTypeMapping<S> extends Types.TypeMapping<S> {
244+
public abstract static class StructuralTypeMapping<S> extends Types.TypeMapping<S> {
245245

246246
@Override
247247
public Type visitClassType(ClassType t, S s) {
@@ -1786,7 +1786,7 @@ public String toString() {
17861786
}
17871787
}
17881788

1789-
public static abstract class DelegatedType extends Type {
1789+
public abstract static class DelegatedType extends Type {
17901790
public Type qtype;
17911791
public TypeTag tag;
17921792

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4896,7 +4896,7 @@ public String toString() {
48964896
* type itself) of the operation implemented by this visitor; use
48974897
* Void if a second argument is not needed.
48984898
*/
4899-
public static abstract class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S> {
4899+
public abstract static class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S> {
49004900
public final R visit(Type t, S s) { return t.accept(this, s); }
49014901
public R visitClassType(ClassType t, S s) { return visitType(t, s); }
49024902
public R visitWildcardType(WildcardType t, S s) { return visitType(t, s); }
@@ -4923,7 +4923,7 @@ public static abstract class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S
49234923
* symbol itself) of the operation implemented by this visitor; use
49244924
* Void if a second argument is not needed.
49254925
*/
4926-
public static abstract class DefaultSymbolVisitor<R,S> implements Symbol.Visitor<R,S> {
4926+
public abstract static class DefaultSymbolVisitor<R,S> implements Symbol.Visitor<R,S> {
49274927
public final R visit(Symbol s, S arg) { return s.accept(this, arg); }
49284928
public R visitClassSymbol(ClassSymbol s, S arg) { return visitSymbol(s, arg); }
49294929
public R visitMethodSymbol(MethodSymbol s, S arg) { return visitSymbol(s, arg); }
@@ -4946,7 +4946,7 @@ public static abstract class DefaultSymbolVisitor<R,S> implements Symbol.Visitor
49464946
* type itself) of the operation implemented by this visitor; use
49474947
* Void if a second argument is not needed.
49484948
*/
4949-
public static abstract class SimpleVisitor<R,S> extends DefaultTypeVisitor<R,S> {
4949+
public abstract static class SimpleVisitor<R,S> extends DefaultTypeVisitor<R,S> {
49504950
@Override
49514951
public R visitCapturedType(CapturedType t, S s) {
49524952
return visitTypeVar(t, s);
@@ -4966,7 +4966,7 @@ public R visitUndetVar(UndetVar t, S s) {
49664966
* form Type&nbsp;&times;&nbsp;Type&nbsp;&rarr;&nbsp;Boolean.
49674967
* <!-- In plain text: Type x Type -> Boolean -->
49684968
*/
4969-
public static abstract class TypeRelation extends SimpleVisitor<Boolean,Type> {}
4969+
public abstract static class TypeRelation extends SimpleVisitor<Boolean,Type> {}
49704970

49714971
/**
49724972
* A convenience visitor for implementing operations that only
@@ -4976,7 +4976,7 @@ public static abstract class TypeRelation extends SimpleVisitor<Boolean,Type> {}
49764976
* @param <R> the return type of the operation implemented by this
49774977
* visitor; use Void if no return type is needed.
49784978
*/
4979-
public static abstract class UnaryVisitor<R> extends SimpleVisitor<R,Void> {
4979+
public abstract static class UnaryVisitor<R> extends SimpleVisitor<R,Void> {
49804980
public final R visit(Type t) { return t.accept(this, null); }
49814981
}
49824982

@@ -5041,7 +5041,7 @@ public RetentionPolicy getRetention(TypeSymbol sym) {
50415041

50425042
// <editor-fold defaultstate="collapsed" desc="Signature Generation">
50435043

5044-
public static abstract class SignatureGenerator {
5044+
public abstract static class SignatureGenerator {
50455045

50465046
public static class InvalidSignatureException extends RuntimeException {
50475047
private static final long serialVersionUID = 0;

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ protected Flow(Context context) {
341341
* Base visitor class for all visitors implementing dataflow analysis logic.
342342
* This class define the shared logic for handling jumps (break/continue statements).
343343
*/
344-
static abstract class BaseAnalyzer extends TreeScanner {
344+
abstract static class BaseAnalyzer extends TreeScanner {
345345

346346
enum JumpKind {
347347
BREAK(JCTree.Tag.BREAK) {

src/jdk.compiler/share/classes/com/sun/tools/javac/file/JRTIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
public class JRTIndex {
5757
/** Get a shared instance of the cache. */
5858
private static JRTIndex sharedInstance;
59-
public synchronized static JRTIndex getSharedInstance() {
59+
public static synchronized JRTIndex getSharedInstance() {
6060
if (sharedInstance == null) {
6161
try {
6262
sharedInstance = new JRTIndex();

src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ private void addJarClassPath(Path jarFile, boolean warn) {
444444
* @see #initHandlers
445445
* @see #getHandler
446446
*/
447-
protected static abstract class LocationHandler {
447+
protected abstract static class LocationHandler {
448448

449449
/**
450450
* @see JavaFileManager#handleOption
@@ -513,7 +513,7 @@ Iterable<Set<Location>> listLocationsForModules() throws IOException {
513513
/**
514514
* A LocationHandler for a given Location, and associated set of options.
515515
*/
516-
private static abstract class BasicLocationHandler extends LocationHandler {
516+
private abstract static class BasicLocationHandler extends LocationHandler {
517517

518518
final Location location;
519519
final Set<Option> options;

src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -254,7 +254,7 @@ private void builderToString(JCDiagnostic.DiagnosticPosition pos) {
254254
/**
255255
* Base class for indified concatenation bytecode flavors.
256256
*/
257-
private static abstract class Indy extends StringConcat {
257+
private abstract static class Indy extends StringConcat {
258258
public Indy(Context context) {
259259
super(context);
260260
}

src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public void visitError(Attribute.Error e) {
259259
private void typeMismatch(Method method, final Attribute attr) {
260260
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
261261
static final long serialVersionUID = 269;
262-
transient final Method method;
262+
final transient Method method;
263263
AnnotationTypeMismatchExceptionProxy(Method method) {
264264
this.method = method;
265265
}

src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ String newString(int start, int end) {
11151115
return new String(buf, start, end - start);
11161116
}
11171117

1118-
private static abstract class TagParser {
1118+
private abstract static class TagParser {
11191119
enum Kind { INLINE, BLOCK, EITHER }
11201120

11211121
final Kind kind;

0 commit comments

Comments
 (0)