Skip to content
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Mar 22, 2021
2 parents af37d21 + 5262d95 commit 6bc0e20effbae81280818cb92b0d88758cc2d995
Showing 69 changed files with 264 additions and 264 deletions.
@@ -1720,53 +1720,53 @@ private static void checkNonNull(String what, Object x) {
// Method IDs for doOperation
//---------------------------

private final static int
private static final int
ADD_NOTIFICATION_LISTENERS = 1;
private final static int
private static final int
ADD_NOTIFICATION_LISTENER_OBJECTNAME = 2;
private final static int
private static final int
CREATE_MBEAN = 3;
private final static int
private static final int
CREATE_MBEAN_PARAMS = 4;
private final static int
private static final int
CREATE_MBEAN_LOADER = 5;
private final static int
private static final int
CREATE_MBEAN_LOADER_PARAMS = 6;
private final static int
private static final int
GET_ATTRIBUTE = 7;
private final static int
private static final int
GET_ATTRIBUTES = 8;
private final static int
private static final int
GET_DEFAULT_DOMAIN = 9;
private final static int
private static final int
GET_DOMAINS = 10;
private final static int
private static final int
GET_MBEAN_COUNT = 11;
private final static int
private static final int
GET_MBEAN_INFO = 12;
private final static int
private static final int
GET_OBJECT_INSTANCE = 13;
private final static int
private static final int
INVOKE = 14;
private final static int
private static final int
IS_INSTANCE_OF = 15;
private final static int
private static final int
IS_REGISTERED = 16;
private final static int
private static final int
QUERY_MBEANS = 17;
private final static int
private static final int
QUERY_NAMES = 18;
private final static int
private static final int
REMOVE_NOTIFICATION_LISTENER = 19;
private final static int
private static final int
REMOVE_NOTIFICATION_LISTENER_OBJECTNAME = 20;
private final static int
private static final int
REMOVE_NOTIFICATION_LISTENER_OBJECTNAME_FILTER_HANDBACK = 21;
private final static int
private static final int
SET_ATTRIBUTE = 22;
private final static int
private static final int
SET_ATTRIBUTES = 23;
private final static int
private static final int
UNREGISTER_MBEAN = 24;

// SERVER NOTIFICATION
@@ -1794,7 +1794,7 @@ private static String strings(final String[] strs) {

private static final class CombinedClassLoader extends ClassLoader {

private final static class ClassLoaderWrapper extends ClassLoader {
private static final class ClassLoaderWrapper extends ClassLoader {
ClassLoaderWrapper(ClassLoader cl) {
super(cl);
}
@@ -855,6 +855,6 @@ private static IOException newIOException(String message,
private static final int STOPPED = 2;

private int state = CREATED;
private final static Set<RMIConnectorServer> openedServers =
private static final Set<RMIConnectorServer> openedServers =
new HashSet<RMIConnectorServer>();
}
@@ -1516,6 +1516,6 @@ else if (name.startsWith("is") && m.getReturnType() == boolean.class)
return rest;
}

private final static Map<Type, Type> inProgress = newIdentityHashMap();
private static final Map<Type, Type> inProgress = newIdentityHashMap();
// really an IdentityHashSet but that doesn't exist
}
@@ -59,7 +59,7 @@ public ImmutableDescriptor union(Descriptor... descriptors) {
return get(ImmutableDescriptor.union(descriptors));
}

private final static DescriptorCache instance = new DescriptorCache();
private static final DescriptorCache instance = new DescriptorCache();
private final WeakHashMap<ImmutableDescriptor,
WeakReference<ImmutableDescriptor>>
map = new WeakHashMap<ImmutableDescriptor,
@@ -225,7 +225,7 @@ public int compare(Method a, Method b) {
return -1;
return +1; // could assert bret.isAssignableFrom(aret)
}
public final static MethodOrder instance = new MethodOrder();
public static final MethodOrder instance = new MethodOrder();
}


@@ -108,7 +108,7 @@ public interface RegistrationContext {
// Private methods --------------------------------------------->

/* This class is used to match an ObjectName against a pattern. */
private final static class ObjectNamePattern {
private static final class ObjectNamePattern {
private final String[] keys;
private final String[] values;
private final String properties;
@@ -243,10 +243,10 @@ private void stop() {
private long period;

// state
private final static int CONNECTED = 0;
private final static int RE_CONNECTING = 1;
private final static int FAILED = 2;
private final static int TERMINATED = 3;
private static final int CONNECTED = 0;
private static final int RE_CONNECTING = 1;
private static final int FAILED = 2;
private static final int TERMINATED = 3;

private int state = CONNECTED;

@@ -485,7 +485,7 @@ public boolean equals(Object o) {
private final long connectionTimeout;

private static int listenerCounter = 0;
private final static int[] listenerCounterLock = new int[0];
private static final int[] listenerCounterLock = new int[0];

private NotificationBuffer notifBuffer;
private final Map<ObjectName, Set<IdAndFilter>> listenerMap =
@@ -398,7 +398,7 @@ private void parseProperties(Properties props) {
}

private static class Parser {
private final static int EOS = -1; // pseudo-codepoint "end of string"
private static final int EOS = -1; // pseudo-codepoint "end of string"
static {
assert !Character.isWhitespace(EOS);
}
@@ -254,42 +254,42 @@ public class ManagementFactory {
* String representation of the
* {@code ObjectName} for the {@link ClassLoadingMXBean}.
*/
public final static String CLASS_LOADING_MXBEAN_NAME =
public static final String CLASS_LOADING_MXBEAN_NAME =
"java.lang:type=ClassLoading";

/**
* String representation of the
* {@code ObjectName} for the {@link CompilationMXBean}.
*/
public final static String COMPILATION_MXBEAN_NAME =
public static final String COMPILATION_MXBEAN_NAME =
"java.lang:type=Compilation";

/**
* String representation of the
* {@code ObjectName} for the {@link MemoryMXBean}.
*/
public final static String MEMORY_MXBEAN_NAME =
public static final String MEMORY_MXBEAN_NAME =
"java.lang:type=Memory";

/**
* String representation of the
* {@code ObjectName} for the {@link OperatingSystemMXBean}.
*/
public final static String OPERATING_SYSTEM_MXBEAN_NAME =
public static final String OPERATING_SYSTEM_MXBEAN_NAME =
"java.lang:type=OperatingSystem";

/**
* String representation of the
* {@code ObjectName} for the {@link RuntimeMXBean}.
*/
public final static String RUNTIME_MXBEAN_NAME =
public static final String RUNTIME_MXBEAN_NAME =
"java.lang:type=Runtime";

/**
* String representation of the
* {@code ObjectName} for the {@link ThreadMXBean}.
*/
public final static String THREAD_MXBEAN_NAME =
public static final String THREAD_MXBEAN_NAME =
"java.lang:type=Threading";

/**
@@ -299,7 +299,7 @@ public class ManagementFactory {
* can be formed by appending this string with
* "{@code ,name=}<i>collector's name</i>".
*/
public final static String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE =
public static final String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE =
"java.lang:type=GarbageCollector";

/**
@@ -309,7 +309,7 @@ public class ManagementFactory {
* can be formed by appending this string with
* "{@code ,name=}<i>manager's name</i>".
*/
public final static String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE=
public static final String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE=
"java.lang:type=MemoryManager";

/**
@@ -319,7 +319,7 @@ public class ManagementFactory {
* can be formed by appending this string with
* {@code ,name=}<i>pool's name</i>.
*/
public final static String MEMORY_POOL_MXBEAN_DOMAIN_TYPE=
public static final String MEMORY_POOL_MXBEAN_DOMAIN_TYPE=
"java.lang:type=MemoryPool";

/**
@@ -69,21 +69,21 @@
public class MBeanServerPermission extends BasicPermission {
private static final long serialVersionUID = -5661980843569388590L;

private final static int
private static final int
CREATE = 0,
FIND = 1,
NEW = 2,
RELEASE = 3,
N_NAMES = 4;

private final static String[] names = {
private static final String[] names = {
"createMBeanServer",
"findMBeanServer",
"newMBeanServer",
"releaseMBeanServer",
};

private final static int
private static final int
CREATE_MASK = 1<<CREATE,
FIND_MASK = 1<<FIND,
NEW_MASK = 1<<NEW,
@@ -98,7 +98,7 @@ public class MBeanServerPermission extends BasicPermission {
* permissions, we should consider doing this differently,
* e.g. with a Map.
*/
private final static String[] canonicalNames = new String[1 << N_NAMES];
private static final String[] canonicalNames = new String[1 << N_NAMES];

/*
* The target names mask. This is not private to avoid having to
@@ -331,7 +331,7 @@ public int hashCode() {
private final Executor executor;
private final MBeanNotificationInfo[] notifInfo;

private final static Executor defaultExecutor = new Executor() {
private static final Executor defaultExecutor = new Executor() {
// DirectExecutor using caller thread
public void execute(Runnable r) {
r.run();
@@ -125,7 +125,7 @@
*/
public class StandardMBean implements DynamicMBean, MBeanRegistration {

private final static DescriptorCache descriptors =
private static final DescriptorCache descriptors =
DescriptorCache.getInstance(JMX.proof);

/**
@@ -179,7 +179,7 @@
*/
private Descriptor attrDescriptor = validDescriptor(null);

private final static String currClass = "ModelMBeanAttributeInfo";
private static final String currClass = "ModelMBeanAttributeInfo";

/**
* Constructs a ModelMBeanAttributeInfo object with a default
@@ -151,7 +151,7 @@
*/
private Descriptor consDescriptor = validDescriptor(null);

private final static String currClass = "ModelMBeanConstructorInfo";
private static final String currClass = "ModelMBeanConstructorInfo";


/**
@@ -142,7 +142,7 @@
private boolean registered = false;
private transient MBeanServer server = null;

private final static JavaSecurityAccess javaSecurityAccess = SharedSecrets.getJavaSecurityAccess();
private static final JavaSecurityAccess javaSecurityAccess = SharedSecrets.getJavaSecurityAccess();
final private AccessControlContext acc = AccessController.getContext();

/*************************************/
@@ -253,7 +253,7 @@ public final synchronized void setDerivedGaugeTimeStamp(
* automatically incremented when their size becomes greater than
* their capacity.
*/
protected final static int capacityIncrement = 16;
protected static final int capacityIncrement = 16;

/**
* The number of valid components in the vector of observed objects.
@@ -727,11 +727,11 @@ private static int indexOfFirstNotInSet(String s, BitSet set,
return i;
}

private final static BitSet alphaBitSet = new BitSet(128);
private final static BitSet numericBitSet = new BitSet(128);
private final static BitSet alphaNumericBitSet = new BitSet(128);
private final static BitSet protocolBitSet = new BitSet(128);
private final static BitSet hostNameBitSet = new BitSet(128);
private static final BitSet alphaBitSet = new BitSet(128);
private static final BitSet numericBitSet = new BitSet(128);
private static final BitSet alphaNumericBitSet = new BitSet(128);
private static final BitSet protocolBitSet = new BitSet(128);
private static final BitSet hostNameBitSet = new BitSet(128);
static {
/* J2SE 1.4 adds lots of handy methods to BitSet that would
allow us to simplify here, e.g. by not writing loops, but
@@ -39,7 +39,7 @@
public class HotspotInternal
implements HotspotInternalMBean, MBeanRegistration {

private final static String HOTSPOT_INTERNAL_MBEAN_NAME =
private static final String HOTSPOT_INTERNAL_MBEAN_NAME =
"sun.management:type=HotspotInternal";
private static ObjectName objName = Util.newObjectName(HOTSPOT_INTERNAL_MBEAN_NAME);
private MBeanServer server = null;
@@ -183,9 +183,9 @@ public static String[] getAllMemoryPoolNames() {
//
static final class LoggingMXBeanAccess {

final static String LOG_MANAGER_CLASS_NAME = "java.util.logging.LogManager";
final static String LOGGING_MXBEAN_CLASS_NAME = "java.util.logging.LoggingMXBean";
final static Class<?> LOG_MANAGER_CLASS = loadLoggingClass(LOG_MANAGER_CLASS_NAME);
static final String LOG_MANAGER_CLASS_NAME = "java.util.logging.LogManager";
static final String LOGGING_MXBEAN_CLASS_NAME = "java.util.logging.LoggingMXBean";
static final Class<?> LOG_MANAGER_CLASS = loadLoggingClass(LOG_MANAGER_CLASS_NAME);

static boolean isAvailable() {
return LOG_MANAGER_CLASS != null;
@@ -355,7 +355,7 @@ public static List<BufferPoolMXBean> getBufferPoolMXBeans() {
return bufferPools;
}

private final static String BUFFER_POOL_MXBEAN_NAME = "java.nio:type=BufferPool";
private static final String BUFFER_POOL_MXBEAN_NAME = "java.nio:type=BufferPool";

/**
* Creates management interface for the given buffer pool.
@@ -484,19 +484,19 @@ public Void run() throws MBeanRegistrationException,
}
}

private final static String HOTSPOT_CLASS_LOADING_MBEAN_NAME =
private static final String HOTSPOT_CLASS_LOADING_MBEAN_NAME =
"sun.management:type=HotspotClassLoading";

private final static String HOTSPOT_COMPILATION_MBEAN_NAME =
private static final String HOTSPOT_COMPILATION_MBEAN_NAME =
"sun.management:type=HotspotCompilation";

private final static String HOTSPOT_MEMORY_MBEAN_NAME =
private static final String HOTSPOT_MEMORY_MBEAN_NAME =
"sun.management:type=HotspotMemory";

private static final String HOTSPOT_RUNTIME_MBEAN_NAME =
"sun.management:type=HotspotRuntime";

private final static String HOTSPOT_THREAD_MBEAN_NAME =
private static final String HOTSPOT_THREAD_MBEAN_NAME =
"sun.management:type=HotspotThreading";

static void registerInternalMBeans(MBeanServer mbs) {

0 comments on commit 6bc0e20

Please sign in to comment.