Skip to content

Commit 8345120

Browse files
magicuspull[bot]
authored andcommitted
8325109: Sort method modifiers in canonical order
Reviewed-by: aivanov, rriggs, darcy, prappo
1 parent 4eac266 commit 8345120

File tree

39 files changed

+61
-61
lines changed

39 files changed

+61
-61
lines changed

src/java.base/share/classes/java/lang/ThreadBuilders.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public ThreadFactory factory() {
272272
/**
273273
* Base ThreadFactory implementation.
274274
*/
275-
private static abstract class BaseThreadFactory implements ThreadFactory {
275+
private abstract static class BaseThreadFactory implements ThreadFactory {
276276
private static final VarHandle COUNT;
277277
static {
278278
try {

src/java.base/share/classes/java/util/FormatItem.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public long prepend(long lengthCoder, byte[] buffer) throws Throwable {
424424
}
425425
}
426426

427-
static abstract sealed class FormatItemModifier implements FormatConcatItem
427+
abstract static sealed class FormatItemModifier implements FormatConcatItem
428428
permits FormatItemFillLeft,
429429
FormatItemFillRight
430430
{

src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ public String toString() {
16241624
* been cancelled on entry and might not otherwise be cancelled by
16251625
* others.
16261626
*/
1627-
static abstract class InterruptibleTask<T> extends ForkJoinTask<T>
1627+
abstract static class InterruptibleTask<T> extends ForkJoinTask<T>
16281628
implements RunnableFuture<T> {
16291629
transient volatile Thread runner;
16301630
abstract T compute() throws Exception;

src/java.base/share/classes/jdk/internal/classfile/impl/AbstractInstruction.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public AbstractInstruction(Opcode op, int size) {
114114
@Override
115115
public abstract void writeTo(DirectCodeBuilder writer);
116116

117-
public static abstract sealed class BoundInstruction extends AbstractInstruction {
117+
public abstract static sealed class BoundInstruction extends AbstractInstruction {
118118
final CodeImpl code;
119119
final int pos;
120120

@@ -760,7 +760,7 @@ public int slot() {
760760

761761
}
762762

763-
public static abstract sealed class UnboundInstruction extends AbstractInstruction {
763+
public abstract static sealed class UnboundInstruction extends AbstractInstruction {
764764

765765
UnboundInstruction(Opcode op) {
766766
super(op, op.sizeIfFixed());

src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ public void writeTo(BufWriter pool) {
471471
}
472472
}
473473

474-
static abstract sealed class AbstractRefEntry<T extends PoolEntry> extends AbstractPoolEntry {
474+
abstract static sealed class AbstractRefEntry<T extends PoolEntry> extends AbstractPoolEntry {
475475
protected final T ref1;
476476

477477
public AbstractRefEntry(ConstantPool constantPool, int tag, int index, T ref1) {
@@ -494,7 +494,7 @@ public String toString() {
494494
}
495495
}
496496

497-
static abstract sealed class AbstractRefsEntry<T extends PoolEntry, U extends PoolEntry>
497+
abstract static sealed class AbstractRefsEntry<T extends PoolEntry, U extends PoolEntry>
498498
extends AbstractPoolEntry {
499499
protected final T ref1;
500500
protected final U ref2;
@@ -525,7 +525,7 @@ public String toString() {
525525
}
526526
}
527527

528-
static abstract sealed class AbstractNamedEntry extends AbstractRefEntry<Utf8EntryImpl> {
528+
abstract static sealed class AbstractNamedEntry extends AbstractRefEntry<Utf8EntryImpl> {
529529

530530
public AbstractNamedEntry(ConstantPool constantPool, int tag, int index, Utf8EntryImpl ref1) {
531531
super(constantPool, tag, index, ref1);
@@ -697,7 +697,7 @@ public boolean equals(Object o) {
697697
}
698698
}
699699

700-
public static abstract sealed class AbstractMemberRefEntry
700+
public abstract static sealed class AbstractMemberRefEntry
701701
extends AbstractRefsEntry<ClassEntryImpl, NameAndTypeEntryImpl>
702702
implements MemberRefEntry {
703703

@@ -773,7 +773,7 @@ public InterfaceMethodRefEntry clone(ConstantPoolBuilder cp) {
773773
}
774774
}
775775

776-
public static abstract sealed class AbstractDynamicConstantPoolEntry extends AbstractPoolEntry {
776+
public abstract static sealed class AbstractDynamicConstantPoolEntry extends AbstractPoolEntry {
777777

778778
private final int bsmIndex;
779779
private BootstrapMethodEntryImpl bootstrapMethod;
@@ -1043,7 +1043,7 @@ public boolean equals(Object o) {
10431043

10441044
}
10451045

1046-
static abstract sealed class PrimitiveEntry<T extends ConstantDesc>
1046+
abstract static sealed class PrimitiveEntry<T extends ConstantDesc>
10471047
extends AbstractPoolEntry {
10481048
protected final T val;
10491049

src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPseudoInstruction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public void writeTo(DirectCodeBuilder writer) {
154154

155155
}
156156

157-
private static abstract sealed class AbstractLocalPseudo extends AbstractPseudoInstruction {
157+
private abstract static sealed class AbstractLocalPseudo extends AbstractPseudoInstruction {
158158
protected final int slot;
159159
protected final Utf8Entry name;
160160
protected final Utf8Entry descriptor;

src/java.base/share/classes/jdk/internal/classfile/impl/BoundAttribute.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ public List<ClassEntry> permittedSubclasses() {
935935
}
936936
}
937937

938-
public static abstract sealed class BoundCodeAttribute
938+
public abstract static sealed class BoundCodeAttribute
939939
extends BoundAttribute<CodeAttribute>
940940
implements CodeAttribute
941941
permits CodeImpl {

src/java.base/share/classes/jdk/internal/classfile/impl/UnboundAttribute.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ public List<ModuleProvideInfo> provides() {
897897
}
898898
}
899899

900-
public static abstract non-sealed class AdHocAttribute<T extends Attribute<T>>
900+
public abstract static non-sealed class AdHocAttribute<T extends Attribute<T>>
901901
extends UnboundAttribute<T> {
902902

903903
public AdHocAttribute(AttributeMapper<T> mapper) {

src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
*/
3131

3232
public final class SecurityProviderServiceEvent extends Event {
33-
private final static SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent();
33+
private static final SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent();
3434

3535
/**
3636
* Returns {@code true} if event is enabled, {@code false} otherwise.

src/java.base/share/classes/jdk/internal/event/VirtualThreadEndEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Event recording that a virtual thread has terminated.
2929
*/
3030
public class VirtualThreadEndEvent extends Event {
31-
private final static VirtualThreadEndEvent EVENT = new VirtualThreadEndEvent();
31+
private static final VirtualThreadEndEvent EVENT = new VirtualThreadEndEvent();
3232

3333
/**
3434
* Returns {@code true} if event is enabled, {@code false} otherwise.

src/java.base/share/classes/jdk/internal/event/VirtualThreadStartEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* Event recording that a virtual thread has been started.
2929
*/
3030
public class VirtualThreadStartEvent extends Event {
31-
private final static VirtualThreadStartEvent EVENT = new VirtualThreadStartEvent();
31+
private static final VirtualThreadStartEvent EVENT = new VirtualThreadStartEvent();
3232

3333
/**
3434
* Returns {@code true} if event is enabled, {@code false} otherwise.

src/java.base/share/classes/jdk/internal/math/FloatToDecimal.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* This class exposes a method to render a {@code float} as a string.
3737
*/
38-
final public class FloatToDecimal {
38+
public final class FloatToDecimal {
3939
/*
4040
* For full details about this code see the following references:
4141
*

src/java.base/share/classes/jdk/internal/vm/Continuation.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ private void finish() {
296296
}
297297

298298
@IntrinsicCandidate
299-
private native static int doYield();
299+
private static native int doYield();
300300

301301
@IntrinsicCandidate
302-
private native static void enterSpecial(Continuation c, boolean isContinue, boolean isVirtualThread);
302+
private static native void enterSpecial(Continuation c, boolean isContinue, boolean isVirtualThread);
303303

304304

305305
@Hidden
@@ -448,7 +448,7 @@ public static boolean isPinned(ContinuationScope scope) {
448448
return res != 0;
449449
}
450450

451-
static private native int isPinned0(ContinuationScope scope);
451+
private static native int isPinned0(ContinuationScope scope);
452452

453453
private boolean fence() {
454454
U.storeFence(); // needed to prevent certain transformations by the compiler

src/java.base/share/classes/jdk/internal/vm/ThreadContainers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private static ThreadContainer next(ThreadContainer container) {
208208
* Root container that "contains" all platform threads not started in a container.
209209
* It may include all virtual threads started directly with the Thread API.
210210
*/
211-
private static abstract class RootContainer extends ThreadContainer {
211+
private abstract static class RootContainer extends ThreadContainer {
212212
protected RootContainer() {
213213
super(true);
214214
}

src/java.base/share/classes/sun/net/util/IPAddressUtil.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -882,8 +882,8 @@ public static boolean delayURLParsing() {
882882
private static final int[] SUPPORTED_RADIXES = new int[]{HEXADECIMAL, OCTAL, DECIMAL};
883883

884884
// BSD parser's return values
885-
private final static long CANT_PARSE_IN_RADIX = -1L;
886-
private final static long TERMINAL_PARSE_ERROR = -2L;
885+
private static final long CANT_PARSE_IN_RADIX = -1L;
886+
private static final long TERMINAL_PARSE_ERROR = -2L;
887887

888888
private static final String ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP = "jdk.net.allowAmbiguousIPAddressLiterals";
889889
private static final boolean ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP_VALUE = Boolean.valueOf(

src/java.base/share/classes/sun/security/util/math/intpoly/IntegerPolynomialModBinP.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected void square(long[] a, long[] r) {
205205
/**
206206
* The field of integers modulo the order of the Curve25519 subgroup
207207
*/
208-
public final static class Curve25519OrderField extends IntegerPolynomialModBinP {
208+
public static final class Curve25519OrderField extends IntegerPolynomialModBinP {
209209

210210
public Curve25519OrderField() {
211211
super(26, 10, 252,
@@ -216,7 +216,7 @@ public Curve25519OrderField() {
216216
/**
217217
* The field of integers modulo the order of the Curve448 subgroup
218218
*/
219-
public final static class Curve448OrderField extends IntegerPolynomialModBinP {
219+
public static final class Curve448OrderField extends IntegerPolynomialModBinP {
220220

221221
public Curve448OrderField() {
222222
super(28, 16, 446,

src/java.desktop/share/classes/sun/java2d/loops/GraphicsPrimitiveMgr.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private static void writeLog(String str) {
245245
* A holder for general primitives to avoid circular dependencies
246246
* between GraphicsPrimitiveMgr and Blit/etc classes.
247247
*/
248-
final static class GeneralPrimitives {
248+
static final class GeneralPrimitives {
249249

250250
private static GraphicsPrimitive[] primitives;
251251

src/java.naming/share/classes/com/sun/jndi/ldap/pool/Connections.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ final class Connections implements PoolCallback {
7070
com.sun.jndi.ldap.LdapPoolManager.trace;
7171
private static final int DEFAULT_SIZE = 10;
7272

73-
final private int initSize;
73+
private final int initSize;
7474
private final int maxSize;
7575
private final int prefSize;
7676
private final List<ConnectionDesc> conns;
77-
final private PooledConnectionFactory factory;
77+
private final PooledConnectionFactory factory;
7878

7979
private boolean closed = false; // Closed for business
8080
private Reference<Object> ref; // maintains reference to id to prevent premature GC

src/java.security.jgss/share/classes/sun/security/jgss/wrapper/GSSNameElement.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class GSSNameElement implements GSSNameSpi {
5454
final long pName; // Pointer to the gss_name_t structure
5555
private String printableName;
5656
private Oid printableType;
57-
final private GSSLibStub cStub;
57+
private final GSSLibStub cStub;
5858

5959
static final GSSNameElement DEF_ACCEPTOR = new GSSNameElement();
6060

src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7424,7 +7424,7 @@ T getResult() throws Exception {
74247424
* A helper class to handle coordinate conversion between screen and user spaces.
74257425
* See {@link sun.java2d.SunGraphicsEnvironment}
74267426
*/
7427-
private static abstract class AccessibilityGraphicsEnvironment extends GraphicsEnvironment {
7427+
private abstract static class AccessibilityGraphicsEnvironment extends GraphicsEnvironment {
74287428
/**
74297429
* Returns the graphics configuration which bounds contain the given point in the user's space.
74307430
*

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class JavaTokenizer extends UnicodeReader {
6262
/**
6363
* Sentinel for non-value.
6464
*/
65-
private final static int NOT_FOUND = -1;
65+
private static final int NOT_FOUND = -1;
6666

6767
/**
6868
* The source language setting. Copied from scanner factory.

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ static PrivateKey privateKey(Session session, long keyID, String algorithm,
414414
}
415415

416416
// base class for all PKCS11 private keys
417-
private static abstract class P11PrivateKey extends P11Key implements
417+
private abstract static class P11PrivateKey extends P11Key implements
418418
PrivateKey {
419419
@Serial
420420
private static final long serialVersionUID = -2138581185214187615L;
@@ -479,7 +479,7 @@ byte[] getEncodedInternal() {
479479
}
480480

481481
// base class for all PKCS11 public keys
482-
private static abstract class P11PublicKey extends P11Key implements
482+
private abstract static class P11PublicKey extends P11Key implements
483483
PublicKey {
484484
@Serial
485485
private static final long serialVersionUID = 1L;

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static boolean checkUse(KeyInfo ki, KeyInfo si) {
129129
}
130130
}
131131

132-
static abstract sealed class PBEKeyInfo extends KeyInfo
132+
abstract static sealed class PBEKeyInfo extends KeyInfo
133133
permits AESPBEKeyInfo, PBKDF2KeyInfo, P12MacPBEKeyInfo {
134134
public static final long INVALID_PRF = -1;
135135
public final long kdfMech;

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorOperators.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ private static Comparison compare(String name, String opName, int opCode, int fl
801801
kind, dom, ran);
802802
}
803803

804-
private static abstract class OperatorImpl implements Operator {
804+
private abstract static class OperatorImpl implements Operator {
805805
private final String symName;
806806
private final String opName;
807807
private final int opInfo;
@@ -1111,7 +1111,7 @@ private final void check(char kind, LaneType dom, LaneType ran) {
11111111
private static final @Stable ConversionImpl<?,?>[][][]
11121112
CACHES = new ConversionImpl<?,?>[KIND_LIMIT][LINE_LIMIT][LINE_LIMIT];
11131113

1114-
private synchronized static void initCaches() {
1114+
private static synchronized void initCaches() {
11151115
for (var f : VectorOperators.class.getFields()) {
11161116
if (f.getType() != Conversion.class) continue;
11171117
ConversionImpl<?,?> conv;

src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
7070
BACKGROUND_WHITE,
7171
};
7272

73-
private final static int MAX_ESCAPE_SEQUENCE_LENGTH = 100;
73+
private static final int MAX_ESCAPE_SEQUENCE_LENGTH = 100;
7474

7575
private final Pointer console;
7676

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PreviewAPIListBuilder.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
*/
4242
public class PreviewAPIListBuilder extends SummaryAPIListBuilder {
4343

44-
final private Map<Element, JEP> elementJeps = new HashMap<>();
45-
final private Map<String, JEP> jeps = new HashMap<>();
44+
private final Map<Element, JEP> elementJeps = new HashMap<>();
45+
private final Map<String, JEP> jeps = new HashMap<>();
4646

4747
/**
4848
* The JEP for a preview feature in this release.

src/jdk.jdi/share/classes/com/sun/tools/jdi/SunCommandLineLauncher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class SunCommandLineLauncher extends AbstractLauncher {
4747
private static final String ARG_QUOTE = "quote";
4848
private static final String ARG_VM_EXEC = "vmexec";
4949

50-
static private final String ARG_VM_INCLUDE_VTHREADS = "includevirtualthreads";
50+
private static final String ARG_VM_INCLUDE_VTHREADS = "includevirtualthreads";
5151

5252
TransportService transportService;
5353
Transport transport;

src/jdk.jfr/share/classes/jdk/jfr/internal/EventWriterKey.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// without the need to load classes or have an impact on security
3232
// related events, like SecureRandom::getAlgorithm("NativePRNGNonBlocking") does
3333
public final class EventWriterKey {
34-
private final static long KEY = createKey();
34+
private static final long KEY = createKey();
3535
private static boolean loaded;
3636
private static boolean logged;
3737

src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private static class ChunkRotationMonitor {}
5050
*/
5151
public static final Object CHUNK_ROTATION_MONITOR = new ChunkRotationMonitor();
5252

53-
private volatile static boolean nativeOK;
53+
private static volatile boolean nativeOK;
5454

5555
private static native void registerNatives();
5656

src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ private static void addUserFields(Class<?> clazz, Type type, List<ValueDescripto
339339
}
340340

341341
// By convention all events have these fields.
342-
public synchronized static void addImplicitFields(Type type, boolean requestable, boolean hasDuration, boolean hasThread, boolean hasStackTrace, boolean hasCutoff) {
342+
public static synchronized void addImplicitFields(Type type, boolean requestable, boolean hasDuration, boolean hasThread, boolean hasStackTrace, boolean hasCutoff) {
343343
if (!implicitFieldTypes) {
344344
createAnnotationType(Timespan.class);
345345
createAnnotationType(Timestamp.class);

0 commit comments

Comments
 (0)