8276348: Use blessed modifier order in java.base

Reviewed-by: dfuchs, darcy, iris, rriggs, martin
This commit is contained in:
Pavel Rappo 2021-11-03 10:07:48 +00:00
parent 465d350d0b
commit 615063364a
21 changed files with 39 additions and 39 deletions

View file

@ -561,7 +561,7 @@ public interface ObjectInputFilter {
/** /**
* Lock object for filter and filter factory. * Lock object for filter and filter factory.
*/ */
private final static Object serialFilterLock = new Object(); private static final Object serialFilterLock = new Object();
/** /**
* The property name for the filter. * The property name for the filter.
@ -906,7 +906,7 @@ public interface ObjectInputFilter {
* used for all ObjectInputStreams that do not set their own filters. * used for all ObjectInputStreams that do not set their own filters.
* *
*/ */
final static class Global implements ObjectInputFilter { static final class Global implements ObjectInputFilter {
/** /**
* The pattern used to create the filter. * The pattern used to create the filter.
*/ */

View file

@ -2515,7 +2515,7 @@ public class ObjectStreamClass implements Serializable {
} }
// a key composed of ObjectStreamField[] names and types // a key composed of ObjectStreamField[] names and types
static abstract class Key { abstract static class Key {
abstract int length(); abstract int length();
abstract String fieldName(int i); abstract String fieldName(int i);
abstract Class<?> fieldType(int i); abstract Class<?> fieldType(int i);

View file

@ -278,7 +278,7 @@ public class Object {
* <li>By executing the body of a {@code synchronized} statement * <li>By executing the body of a {@code synchronized} statement
* that synchronizes on the object. * that synchronizes on the object.
* <li>For objects of type {@code Class,} by executing a * <li>For objects of type {@code Class,} by executing a
* synchronized static method of that class. * static synchronized method of that class.
* </ul> * </ul>
* <p> * <p>
* Only one thread at a time can own an object's monitor. * Only one thread at a time can own an object's monitor.

View file

@ -845,7 +845,7 @@ public abstract class Process {
* A nested class to delay looking up the Charset for the native encoding. * A nested class to delay looking up the Charset for the native encoding.
*/ */
private static class CharsetHolder { private static class CharsetHolder {
private final static Charset nativeCharset; private static final Charset nativeCharset;
static { static {
Charset cs; Charset cs;
try { try {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -118,7 +118,7 @@ final class StackStreamFactory {
* For example, StackFrameInfo for StackWalker::walk or * For example, StackFrameInfo for StackWalker::walk or
* Class<?> for StackWalker::getCallerClass * Class<?> for StackWalker::getCallerClass
*/ */
static abstract class AbstractStackWalker<R, T> { abstract static class AbstractStackWalker<R, T> {
protected final StackWalker walker; protected final StackWalker walker;
protected final Thread thread; protected final Thread thread;
protected final int maxDepth; protected final int maxDepth;
@ -783,7 +783,7 @@ final class StackStreamFactory {
* *
* Each specialized AbstractStackWalker subclass may subclass the FrameBuffer. * Each specialized AbstractStackWalker subclass may subclass the FrameBuffer.
*/ */
static abstract class FrameBuffer<F> { abstract static class FrameBuffer<F> {
static final int START_POS = 2; // 0th and 1st elements are reserved static final int START_POS = 2; // 0th and 1st elements are reserved
// buffers for VM to fill stack frame info // buffers for VM to fill stack frame info

View file

@ -331,7 +331,7 @@ public final class System {
private static class CallersHolder { private static class CallersHolder {
// Remember callers of setSecurityManager() here so that warning // Remember callers of setSecurityManager() here so that warning
// is only printed once for each different caller // is only printed once for each different caller
final static Map<Class<?>, Boolean> callers static final Map<Class<?>, Boolean> callers
= Collections.synchronizedMap(new WeakHashMap<>()); = Collections.synchronizedMap(new WeakHashMap<>());
} }
@ -1595,7 +1595,7 @@ public final class System {
* *
* @since 9 * @since 9
*/ */
public static abstract class LoggerFinder { public abstract static class LoggerFinder {
/** /**
* The {@code RuntimePermission("loggerFinder")} is * The {@code RuntimePermission("loggerFinder")} is
* necessary to subclass and instantiate the {@code LoggerFinder} class, * necessary to subclass and instantiate the {@code LoggerFinder} class,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -340,7 +340,7 @@ final class WeakPairMap<K1, K2, V> {
/** /**
* Common abstract supertype of a pair of WeakReference peers. * Common abstract supertype of a pair of WeakReference peers.
*/ */
private static abstract class WeakRefPeer<K> extends WeakReference<K> { private abstract static class WeakRefPeer<K> extends WeakReference<K> {
WeakRefPeer(K k, ReferenceQueue<Object> queue) { WeakRefPeer(K k, ReferenceQueue<Object> queue) {
super(Objects.requireNonNull(k), queue); super(Objects.requireNonNull(k), queue);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -244,7 +244,7 @@ abstract class AbstractConstantGroup implements ConstantGroup {
} }
} }
static abstract abstract static
class WithCache extends AbstractConstantGroup { class WithCache extends AbstractConstantGroup {
@Stable final Object[] cache; @Stable final Object[] cache;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -84,8 +84,8 @@ private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String nam
* @author John Rose, JSR 292 EG * @author John Rose, JSR 292 EG
* @since 1.7 * @since 1.7
*/ */
abstract public
public class CallSite { abstract class CallSite {
// The actual payload of this call site. // The actual payload of this call site.
// Can be modified using {@link MethodHandleNatives#setCallSiteTargetNormal} or {@link MethodHandleNatives#setCallSiteTargetVolatile}. // Can be modified using {@link MethodHandleNatives#setCallSiteTargetNormal} or {@link MethodHandleNatives#setCallSiteTargetVolatile}.

View file

@ -215,7 +215,7 @@ public class InetAddress implements java.io.Serializable {
@Native static final int IPv6 = 2; @Native static final int IPv6 = 2;
/* Specify address family preference */ /* Specify address family preference */
static transient final int preferIPv6Address; static final transient int preferIPv6Address;
static class InetAddressHolder { static class InetAddressHolder {
/** /**

View file

@ -820,7 +820,7 @@ public abstract class Provider extends Properties {
// legacy properties changed since last call to any services method? // legacy properties changed since last call to any services method?
private transient boolean legacyChanged; private transient boolean legacyChanged;
// serviceMap changed since last call to getServices() // serviceMap changed since last call to getServices()
private volatile transient boolean servicesChanged; private transient volatile boolean servicesChanged;
// Map<String,String> used to keep track of legacy registration // Map<String,String> used to keep track of legacy registration
private transient Map<String,String> legacyStrings; private transient Map<String,String> legacyStrings;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -142,7 +142,7 @@ class ImmutableCollections {
static UnsupportedOperationException uoe() { return new UnsupportedOperationException(); } static UnsupportedOperationException uoe() { return new UnsupportedOperationException(); }
@jdk.internal.ValueBased @jdk.internal.ValueBased
static abstract class AbstractImmutableCollection<E> extends AbstractCollection<E> { abstract static class AbstractImmutableCollection<E> extends AbstractCollection<E> {
// all mutating methods throw UnsupportedOperationException // all mutating methods throw UnsupportedOperationException
@Override public boolean add(E e) { throw uoe(); } @Override public boolean add(E e) { throw uoe(); }
@Override public boolean addAll(Collection<? extends E> c) { throw uoe(); } @Override public boolean addAll(Collection<? extends E> c) { throw uoe(); }
@ -249,7 +249,7 @@ class ImmutableCollections {
// ---------- List Implementations ---------- // ---------- List Implementations ----------
@jdk.internal.ValueBased @jdk.internal.ValueBased
static abstract class AbstractImmutableList<E> extends AbstractImmutableCollection<E> abstract static class AbstractImmutableList<E> extends AbstractImmutableCollection<E>
implements List<E>, RandomAccess { implements List<E>, RandomAccess {
// all mutating methods throw UnsupportedOperationException // all mutating methods throw UnsupportedOperationException
@ -742,7 +742,7 @@ class ImmutableCollections {
// ---------- Set Implementations ---------- // ---------- Set Implementations ----------
@jdk.internal.ValueBased @jdk.internal.ValueBased
static abstract class AbstractImmutableSet<E> extends AbstractImmutableCollection<E> abstract static class AbstractImmutableSet<E> extends AbstractImmutableCollection<E>
implements Set<E> { implements Set<E> {
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -624,7 +624,7 @@ public abstract class CodePointTrie extends CodePointMap {
static final int NO_INDEX3_NULL_OFFSET = 0x7fff; static final int NO_INDEX3_NULL_OFFSET = 0x7fff;
static final int NO_DATA_NULL_OFFSET = 0xfffff; static final int NO_DATA_NULL_OFFSET = 0xfffff;
private static abstract class Data { private abstract static class Data {
abstract ValueWidth getValueWidth(); abstract ValueWidth getValueWidth();
abstract int getDataLength(); abstract int getDataLength();
abstract int getFromIndex(int index); abstract int getFromIndex(int index);
@ -768,7 +768,7 @@ public abstract class CodePointTrie extends CodePointMap {
* *
* @stable ICU 63 * @stable ICU 63
*/ */
public static abstract class Fast extends CodePointTrie { public abstract static class Fast extends CodePointTrie {
private Fast(char[] index, Data data, int highStart, private Fast(char[] index, Data data, int highStart,
int index3NullOffset, int dataNullOffset) { int index3NullOffset, int dataNullOffset) {
super(index, data, highStart, index3NullOffset, dataNullOffset); super(index, data, highStart, index3NullOffset, dataNullOffset);
@ -906,7 +906,7 @@ public abstract class CodePointTrie extends CodePointMap {
* *
* @stable ICU 63 * @stable ICU 63
*/ */
public static abstract class Small extends CodePointTrie { public abstract static class Small extends CodePointTrie {
private Small(char[] index, Data data, int highStart, private Small(char[] index, Data data, int highStart,
int index3NullOffset, int dataNullOffset) { int index3NullOffset, int dataNullOffset) {
super(index, data, highStart, index3NullOffset, dataNullOffset); super(index, data, highStart, index3NullOffset, dataNullOffset);

View file

@ -61,11 +61,11 @@ public class BasicImageReader implements AutoCloseable {
}); });
} }
static private final boolean IS_64_BIT = private static final boolean IS_64_BIT =
isSystemProperty("sun.arch.data.model", "64", "32"); isSystemProperty("sun.arch.data.model", "64", "32");
static private final boolean USE_JVM_MAP = private static final boolean USE_JVM_MAP =
isSystemProperty("jdk.image.use.jvm.map", "true", "true"); isSystemProperty("jdk.image.use.jvm.map", "true", "true");
static private final boolean MAP_ALL = private static final boolean MAP_ALL =
isSystemProperty("jdk.image.map.all", "true", IS_64_BIT ? "true" : "false"); isSystemProperty("jdk.image.map.all", "true", IS_64_BIT ? "true" : "false");
private final Path imagePath; private final Path imagePath;

View file

@ -45,5 +45,5 @@ class NativeImageBuffer {
}); });
} }
native static ByteBuffer getNativeMap(String imagePath); static native ByteBuffer getNativeMap(String imagePath);
} }

View file

@ -437,7 +437,7 @@ public class SimpleConsoleLogger extends LoggerConfiguration
getSimpleFormat(DEFAULT_FORMAT_PROP_KEY, null); getSimpleFormat(DEFAULT_FORMAT_PROP_KEY, null);
// Make it easier to wrap Logger... // Make it easier to wrap Logger...
static private final String[] skips; private static final String[] skips;
static { static {
String additionalPkgs = String additionalPkgs =
GetPropertyAction.privilegedGetProperty("jdk.logger.packages"); GetPropertyAction.privilegedGetProperty("jdk.logger.packages");

View file

@ -121,7 +121,7 @@ class ModuleReferences {
* A base module reader that encapsulates machinery required to close the * A base module reader that encapsulates machinery required to close the
* module reader safely. * module reader safely.
*/ */
static abstract class SafeCloseModuleReader implements ModuleReader { abstract static class SafeCloseModuleReader implements ModuleReader {
// RW lock to support safe close // RW lock to support safe close
private final ReadWriteLock lock = new ReentrantReadWriteLock(); private final ReadWriteLock lock = new ReentrantReadWriteLock();

View file

@ -888,7 +888,7 @@ public class FileChannelImpl
// -- Memory-mapped buffers -- // -- Memory-mapped buffers --
private static abstract class Unmapper private abstract static class Unmapper
implements Runnable, UnmapperProxy implements Runnable, UnmapperProxy
{ {
// may be required to close file // may be required to close file

View file

@ -71,7 +71,7 @@ public final class ProviderList {
static final ProviderList EMPTY = new ProviderList(PC0, true); static final ProviderList EMPTY = new ProviderList(PC0, true);
// list of all jdk.security.provider.preferred entries // list of all jdk.security.provider.preferred entries
static private PreferredList preferredPropList = null; private static PreferredList preferredPropList = null;
// dummy provider object to use during initialization // dummy provider object to use during initialization
// used to avoid explicit null checks in various places // used to avoid explicit null checks in various places

View file

@ -60,12 +60,12 @@ public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
private final BigInteger n; // modulus private final BigInteger n; // modulus
private final BigInteger d; // private exponent private final BigInteger d; // private exponent
private transient final KeyType type; private final transient KeyType type;
// optional parameters associated with this RSA key // optional parameters associated with this RSA key
// specified in the encoding of its AlgorithmId. // specified in the encoding of its AlgorithmId.
// must be null for "RSA" keys. // must be null for "RSA" keys.
private transient final AlgorithmParameterSpec keyParams; private final transient AlgorithmParameterSpec keyParams;
/** /**
* Construct a key from its components. Used by the * Construct a key from its components. Used by the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2006, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -550,7 +550,7 @@ enum SSLHandshake implements SSLConsumer, HandshakeProducer {
/** /**
* A (transparent) specification of handshake message. * A (transparent) specification of handshake message.
*/ */
static abstract class HandshakeMessage { abstract static class HandshakeMessage {
final HandshakeContext handshakeContext; final HandshakeContext handshakeContext;
HandshakeMessage(HandshakeContext handshakeContext) { HandshakeMessage(HandshakeContext handshakeContext) {