8325109: Sort method modifiers in canonical order

Reviewed-by: aivanov, rriggs, darcy, prappo
This commit is contained in:
Magnus Ihse Bursie 2024-02-07 15:50:40 +00:00
parent a3a2b1fbbf
commit 18e24d0619
39 changed files with 61 additions and 61 deletions
src
java.base/share/classes
java.desktop/share/classes/sun/java2d/loops
java.naming/share/classes/com/sun/jndi/ldap/pool
java.security.jgss/share/classes/sun/security/jgss/wrapper
jdk.accessibility/windows/classes/com/sun/java/accessibility/internal
jdk.compiler/share/classes/com/sun/tools/javac/parser
jdk.crypto.cryptoki/share/classes/sun/security/pkcs11
jdk.incubator.vector/share/classes/jdk/incubator/vector
jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win
jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util
jdk.jdi/share/classes/com/sun/tools/jdi
jdk.jfr/share/classes/jdk/jfr
jdk.jpackage
linux/classes/jdk/jpackage/internal
share/classes/jdk/jpackage/internal
unix/classes/jdk/jpackage/internal
utils/IdealGraphVisualizer/View/src/main/java/com/sun/hotspot/igv/view

@ -272,7 +272,7 @@ class ThreadBuilders {
/**
* Base ThreadFactory implementation.
*/
private static abstract class BaseThreadFactory implements ThreadFactory {
private abstract static class BaseThreadFactory implements ThreadFactory {
private static final VarHandle COUNT;
static {
try {

@ -424,7 +424,7 @@ class FormatItem {
}
}
static abstract sealed class FormatItemModifier implements FormatConcatItem
abstract static sealed class FormatItemModifier implements FormatConcatItem
permits FormatItemFillLeft,
FormatItemFillRight
{

@ -1624,7 +1624,7 @@ public abstract class ForkJoinTask<V> implements Future<V>, Serializable {
* been cancelled on entry and might not otherwise be cancelled by
* others.
*/
static abstract class InterruptibleTask<T> extends ForkJoinTask<T>
abstract static class InterruptibleTask<T> extends ForkJoinTask<T>
implements RunnableFuture<T> {
transient volatile Thread runner;
abstract T compute() throws Exception;

@ -114,7 +114,7 @@ public abstract sealed class AbstractInstruction
@Override
public abstract void writeTo(DirectCodeBuilder writer);
public static abstract sealed class BoundInstruction extends AbstractInstruction {
public abstract static sealed class BoundInstruction extends AbstractInstruction {
final CodeImpl code;
final int pos;
@ -760,7 +760,7 @@ public abstract sealed class AbstractInstruction
}
public static abstract sealed class UnboundInstruction extends AbstractInstruction {
public abstract static sealed class UnboundInstruction extends AbstractInstruction {
UnboundInstruction(Opcode op) {
super(op, op.sizeIfFixed());

@ -471,7 +471,7 @@ public abstract sealed class AbstractPoolEntry {
}
}
static abstract sealed class AbstractRefEntry<T extends PoolEntry> extends AbstractPoolEntry {
abstract static sealed class AbstractRefEntry<T extends PoolEntry> extends AbstractPoolEntry {
protected final T ref1;
public AbstractRefEntry(ConstantPool constantPool, int tag, int index, T ref1) {
@ -494,7 +494,7 @@ public abstract sealed class AbstractPoolEntry {
}
}
static abstract sealed class AbstractRefsEntry<T extends PoolEntry, U extends PoolEntry>
abstract static sealed class AbstractRefsEntry<T extends PoolEntry, U extends PoolEntry>
extends AbstractPoolEntry {
protected final T ref1;
protected final U ref2;
@ -525,7 +525,7 @@ public abstract sealed class AbstractPoolEntry {
}
}
static abstract sealed class AbstractNamedEntry extends AbstractRefEntry<Utf8EntryImpl> {
abstract static sealed class AbstractNamedEntry extends AbstractRefEntry<Utf8EntryImpl> {
public AbstractNamedEntry(ConstantPool constantPool, int tag, int index, Utf8EntryImpl ref1) {
super(constantPool, tag, index, ref1);
@ -697,7 +697,7 @@ public abstract sealed class AbstractPoolEntry {
}
}
public static abstract sealed class AbstractMemberRefEntry
public abstract static sealed class AbstractMemberRefEntry
extends AbstractRefsEntry<ClassEntryImpl, NameAndTypeEntryImpl>
implements MemberRefEntry {
@ -773,7 +773,7 @@ public abstract sealed class AbstractPoolEntry {
}
}
public static abstract sealed class AbstractDynamicConstantPoolEntry extends AbstractPoolEntry {
public abstract static sealed class AbstractDynamicConstantPoolEntry extends AbstractPoolEntry {
private final int bsmIndex;
private BootstrapMethodEntryImpl bootstrapMethod;
@ -1043,7 +1043,7 @@ public abstract sealed class AbstractPoolEntry {
}
static abstract sealed class PrimitiveEntry<T extends ConstantDesc>
abstract static sealed class PrimitiveEntry<T extends ConstantDesc>
extends AbstractPoolEntry {
protected final T val;

@ -154,7 +154,7 @@ public abstract sealed class AbstractPseudoInstruction
}
private static abstract sealed class AbstractLocalPseudo extends AbstractPseudoInstruction {
private abstract static sealed class AbstractLocalPseudo extends AbstractPseudoInstruction {
protected final int slot;
protected final Utf8Entry name;
protected final Utf8Entry descriptor;

@ -935,7 +935,7 @@ public abstract sealed class BoundAttribute<T extends Attribute<T>>
}
}
public static abstract sealed class BoundCodeAttribute
public abstract static sealed class BoundCodeAttribute
extends BoundAttribute<CodeAttribute>
implements CodeAttribute
permits CodeImpl {

@ -897,7 +897,7 @@ public abstract sealed class UnboundAttribute<T extends Attribute<T>>
}
}
public static abstract non-sealed class AdHocAttribute<T extends Attribute<T>>
public abstract static non-sealed class AdHocAttribute<T extends Attribute<T>>
extends UnboundAttribute<T> {
public AdHocAttribute(AttributeMapper<T> mapper) {

@ -30,7 +30,7 @@ package jdk.internal.event;
*/
public final class SecurityProviderServiceEvent extends Event {
private final static SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent();
private static final SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent();
/**
* Returns {@code true} if event is enabled, {@code false} otherwise.

@ -28,7 +28,7 @@ package jdk.internal.event;
* Event recording that a virtual thread has terminated.
*/
public class VirtualThreadEndEvent extends Event {
private final static VirtualThreadEndEvent EVENT = new VirtualThreadEndEvent();
private static final VirtualThreadEndEvent EVENT = new VirtualThreadEndEvent();
/**
* Returns {@code true} if event is enabled, {@code false} otherwise.

@ -28,7 +28,7 @@ package jdk.internal.event;
* Event recording that a virtual thread has been started.
*/
public class VirtualThreadStartEvent extends Event {
private final static VirtualThreadStartEvent EVENT = new VirtualThreadStartEvent();
private static final VirtualThreadStartEvent EVENT = new VirtualThreadStartEvent();
/**
* Returns {@code true} if event is enabled, {@code false} otherwise.

@ -35,7 +35,7 @@ import static jdk.internal.math.MathUtils.*;
/**
* This class exposes a method to render a {@code float} as a string.
*/
final public class FloatToDecimal {
public final class FloatToDecimal {
/*
* For full details about this code see the following references:
*

@ -296,10 +296,10 @@ public class Continuation {
}
@IntrinsicCandidate
private native static int doYield();
private static native int doYield();
@IntrinsicCandidate
private native static void enterSpecial(Continuation c, boolean isContinue, boolean isVirtualThread);
private static native void enterSpecial(Continuation c, boolean isContinue, boolean isVirtualThread);
@Hidden
@ -448,7 +448,7 @@ public class Continuation {
return res != 0;
}
static private native int isPinned0(ContinuationScope scope);
private static native int isPinned0(ContinuationScope scope);
private boolean fence() {
U.storeFence(); // needed to prevent certain transformations by the compiler

@ -208,7 +208,7 @@ public class ThreadContainers {
* Root container that "contains" all platform threads not started in a container.
* It may include all virtual threads started directly with the Thread API.
*/
private static abstract class RootContainer extends ThreadContainer {
private abstract static class RootContainer extends ThreadContainer {
protected RootContainer() {
super(true);
}

@ -882,8 +882,8 @@ public class IPAddressUtil {
private static final int[] SUPPORTED_RADIXES = new int[]{HEXADECIMAL, OCTAL, DECIMAL};
// BSD parser's return values
private final static long CANT_PARSE_IN_RADIX = -1L;
private final static long TERMINAL_PARSE_ERROR = -2L;
private static final long CANT_PARSE_IN_RADIX = -1L;
private static final long TERMINAL_PARSE_ERROR = -2L;
private static final String ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP = "jdk.net.allowAmbiguousIPAddressLiterals";
private static final boolean ALLOW_AMBIGUOUS_IPADDRESS_LITERALS_SP_VALUE = Boolean.valueOf(

@ -205,7 +205,7 @@ public sealed class IntegerPolynomialModBinP extends IntegerPolynomial {
/**
* The field of integers modulo the order of the Curve25519 subgroup
*/
public final static class Curve25519OrderField extends IntegerPolynomialModBinP {
public static final class Curve25519OrderField extends IntegerPolynomialModBinP {
public Curve25519OrderField() {
super(26, 10, 252,
@ -216,7 +216,7 @@ public sealed class IntegerPolynomialModBinP extends IntegerPolynomial {
/**
* The field of integers modulo the order of the Curve448 subgroup
*/
public final static class Curve448OrderField extends IntegerPolynomialModBinP {
public static final class Curve448OrderField extends IntegerPolynomialModBinP {
public Curve448OrderField() {
super(28, 16, 446,

@ -245,7 +245,7 @@ public final class GraphicsPrimitiveMgr {
* A holder for general primitives to avoid circular dependencies
* between GraphicsPrimitiveMgr and Blit/etc classes.
*/
final static class GeneralPrimitives {
static final class GeneralPrimitives {
private static GraphicsPrimitive[] primitives;

@ -70,11 +70,11 @@ final class Connections implements PoolCallback {
com.sun.jndi.ldap.LdapPoolManager.trace;
private static final int DEFAULT_SIZE = 10;
final private int initSize;
private final int initSize;
private final int maxSize;
private final int prefSize;
private final List<ConnectionDesc> conns;
final private PooledConnectionFactory factory;
private final PooledConnectionFactory factory;
private boolean closed = false; // Closed for business
private Reference<Object> ref; // maintains reference to id to prevent premature GC

@ -54,7 +54,7 @@ public class GSSNameElement implements GSSNameSpi {
final long pName; // Pointer to the gss_name_t structure
private String printableName;
private Oid printableType;
final private GSSLibStub cStub;
private final GSSLibStub cStub;
static final GSSNameElement DEF_ACCEPTOR = new GSSNameElement();

@ -7424,7 +7424,7 @@ public final class AccessBridge {
* A helper class to handle coordinate conversion between screen and user spaces.
* See {@link sun.java2d.SunGraphicsEnvironment}
*/
private static abstract class AccessibilityGraphicsEnvironment extends GraphicsEnvironment {
private abstract static class AccessibilityGraphicsEnvironment extends GraphicsEnvironment {
/**
* Returns the graphics configuration which bounds contain the given point in the user's space.
*

@ -62,7 +62,7 @@ public class JavaTokenizer extends UnicodeReader {
/**
* Sentinel for non-value.
*/
private final static int NOT_FOUND = -1;
private static final int NOT_FOUND = -1;
/**
* The source language setting. Copied from scanner factory.

@ -414,7 +414,7 @@ abstract class P11Key implements Key, Length {
}
// base class for all PKCS11 private keys
private static abstract class P11PrivateKey extends P11Key implements
private abstract static class P11PrivateKey extends P11Key implements
PrivateKey {
@Serial
private static final long serialVersionUID = -2138581185214187615L;
@ -479,7 +479,7 @@ abstract class P11Key implements Key, Length {
}
// base class for all PKCS11 public keys
private static abstract class P11PublicKey extends P11Key implements
private abstract static class P11PublicKey extends P11Key implements
PublicKey {
@Serial
private static final long serialVersionUID = 1L;

@ -129,7 +129,7 @@ final class P11SecretKeyFactory extends SecretKeyFactorySpi {
}
}
static abstract sealed class PBEKeyInfo extends KeyInfo
abstract static sealed class PBEKeyInfo extends KeyInfo
permits AESPBEKeyInfo, PBKDF2KeyInfo, P12MacPBEKeyInfo {
public static final long INVALID_PRF = -1;
public final long kdfMech;

@ -801,7 +801,7 @@ public abstract class VectorOperators {
kind, dom, ran);
}
private static abstract class OperatorImpl implements Operator {
private abstract static class OperatorImpl implements Operator {
private final String symName;
private final String opName;
private final int opInfo;
@ -1111,7 +1111,7 @@ public abstract class VectorOperators {
private static final @Stable ConversionImpl<?,?>[][][]
CACHES = new ConversionImpl<?,?>[KIND_LIMIT][LINE_LIMIT][LINE_LIMIT];
private synchronized static void initCaches() {
private static synchronized void initCaches() {
for (var f : VectorOperators.class.getFields()) {
if (f.getType() != Conversion.class) continue;
ConversionImpl<?,?> conv;

@ -70,7 +70,7 @@ public final class WindowsAnsiWriter extends AnsiWriter {
BACKGROUND_WHITE,
};
private final static int MAX_ESCAPE_SEQUENCE_LENGTH = 100;
private static final int MAX_ESCAPE_SEQUENCE_LENGTH = 100;
private final Pointer console;

@ -41,8 +41,8 @@ import java.util.TreeSet;
*/
public class PreviewAPIListBuilder extends SummaryAPIListBuilder {
final private Map<Element, JEP> elementJeps = new HashMap<>();
final private Map<String, JEP> jeps = new HashMap<>();
private final Map<Element, JEP> elementJeps = new HashMap<>();
private final Map<String, JEP> jeps = new HashMap<>();
/**
* The JEP for a preview feature in this release.

@ -47,7 +47,7 @@ public class SunCommandLineLauncher extends AbstractLauncher {
private static final String ARG_QUOTE = "quote";
private static final String ARG_VM_EXEC = "vmexec";
static private final String ARG_VM_INCLUDE_VTHREADS = "includevirtualthreads";
private static final String ARG_VM_INCLUDE_VTHREADS = "includevirtualthreads";
TransportService transportService;
Transport transport;

@ -31,7 +31,7 @@ import java.io.InputStream;
// without the need to load classes or have an impact on security
// related events, like SecureRandom::getAlgorithm("NativePRNGNonBlocking") does
public final class EventWriterKey {
private final static long KEY = createKey();
private static final long KEY = createKey();
private static boolean loaded;
private static boolean logged;

@ -50,7 +50,7 @@ public final class JVM {
*/
public static final Object CHUNK_ROTATION_MONITOR = new ChunkRotationMonitor();
private volatile static boolean nativeOK;
private static volatile boolean nativeOK;
private static native void registerNatives();

@ -339,7 +339,7 @@ public final class TypeLibrary {
}
// By convention all events have these fields.
public synchronized static void addImplicitFields(Type type, boolean requestable, boolean hasDuration, boolean hasThread, boolean hasStackTrace, boolean hasCutoff) {
public static synchronized void addImplicitFields(Type type, boolean requestable, boolean hasDuration, boolean hasThread, boolean hasStackTrace, boolean hasCutoff) {
if (!implicitFieldTypes) {
createAnnotationType(Timespan.class);
createAnnotationType(Timestamp.class);

@ -177,9 +177,9 @@ public class Snippets {
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Temperature {
public final static String KELVIN = "KELVIN";
public final static String CELSIUS = "CELSIUS";
public final static String FAHRENEHIT = "FAHRENHEIT";
public static final String KELVIN = "KELVIN";
public static final String CELSIUS = "CELSIUS";
public static final String FAHRENEHIT = "FAHRENHEIT";
String value() default CELSIUS;
}
@ -191,7 +191,7 @@ public class Snippets {
@Category({ "Hardware", "CPU" })
@Period("1 s")
@StackTrace(false)
static public class CPUEvent extends Event {
public static class CPUEvent extends Event {
@Label("ID")
String id;
@ -266,7 +266,7 @@ public class Snippets {
@Category("Debugging")
@StackTrace(false)
@Enabled(false)
static public class StopWatchEvent extends Event {
public static class StopWatchEvent extends Event {
}
public void update() {

@ -98,7 +98,7 @@ public final class LinuxLaunchersAsServices extends UnixLaunchersAsServices {
private final Path unitFilename;
}
private final static List<String> REQUIRED_PACKAGES = List.of("systemd",
private static final List<String> REQUIRED_PACKAGES = List.of("systemd",
"coreutils" /* /usr/bin/wc */, "grep");
private static final String COMMON_SCRIPTS = "COMMON_SCRIPTS";

@ -98,7 +98,7 @@ final class Enquoter {
private BiConsumer<Integer, StringBuilder> escaper;
private Predicate<String> needQuotes = str -> false;
private final static Predicate<String> QUOTE_IF_WHITESPACES = new Predicate<String>() {
private static final Predicate<String> QUOTE_IF_WHITESPACES = new Predicate<String>() {
@Override
public boolean test(String t) {
return pattern.matcher(t).find();
@ -106,7 +106,7 @@ final class Enquoter {
private final Pattern pattern = Pattern.compile("\\s");
};
private final static BiConsumer<Integer, StringBuilder> PREPEND_BACKSLASH = (chr, buf) -> {
private static final BiConsumer<Integer, StringBuilder> PREPEND_BACKSLASH = (chr, buf) -> {
buf.append('\\');
buf.appendCodePoint(chr);
};

@ -62,5 +62,5 @@ public final class PackageFile {
private final String packageName;
private final static String FILENAME = ".package";
private static final String FILENAME = ".package";
}

@ -71,9 +71,9 @@ final class ShellScriptResource {
private Set<PosixFilePermission> execPerms = ALL_CAN_EXECUTE;
private OverridableResource resource;
private final static Set<PosixFilePermission> ALL_CAN_EXECUTE = Set.of(
private static final Set<PosixFilePermission> ALL_CAN_EXECUTE = Set.of(
PosixFilePermission.OWNER_EXECUTE, PosixFilePermission.GROUP_EXECUTE,
PosixFilePermission.OTHERS_EXECUTE);
private final static Set<PosixFilePermission> OWNER_CAN_EXECUTE = Set.of(
private static final Set<PosixFilePermission> OWNER_CAN_EXECUTE = Set.of(
PosixFilePermission.OWNER_EXECUTE);
}

@ -104,7 +104,7 @@ class UnixLaunchersAsServices extends ShellCustomAction {
return launchers.isEmpty();
}
static abstract class UnixLauncherAsService extends LauncherAsService {
abstract static class UnixLauncherAsService extends LauncherAsService {
UnixLauncherAsService(String name, Map<String, Object> mainParams,
OverridableResource resource) {

@ -33,7 +33,7 @@ import org.openide.util.HelpCtx;
import org.openide.util.actions.CallableSystemAction;
abstract public class ExpandAdjacentAction extends CallableSystemAction {
public abstract class ExpandAdjacentAction extends CallableSystemAction {
protected void expandFigures(Function<Figure, List<Figure>> getAdjacentFigures) {
EditorTopComponent editor = EditorTopComponent.getActive();
@ -47,9 +47,9 @@ abstract public class ExpandAdjacentAction extends CallableSystemAction {
}
}
abstract public void performAction();
public abstract void performAction();
abstract public String getName();
public abstract String getName();
@Override
public HelpCtx getHelpCtx() {

@ -30,7 +30,7 @@ import org.openide.util.ImageUtilities;
import org.openide.util.Lookup;
abstract public class ModelAwareAction extends ContextAction<DiagramViewModel> {
public abstract class ModelAwareAction extends ContextAction<DiagramViewModel> {
public ModelAwareAction() {
putValue(Action.SMALL_ICON , ImageUtilities.loadImageIcon(iconResource(), true));

@ -58,7 +58,7 @@ public class LineWidget extends Widget implements PopupMenuProvider {
public final int HOVER_ARROW_SIZE = 8;
public final int BOLD_STROKE_WIDTH = 2;
public final int HOVER_STROKE_WIDTH = 3;
private final static double ZOOM_FACTOR = 0.1;
private static final double ZOOM_FACTOR = 0.1;
private final OutputSlot outputSlot;
private final DiagramScene scene;
private final List<Connection> connections;