Skip to content

Commit 7023b3f

Browse files
committed
8276628: Use blessed modifier order in serviceability code
Reviewed-by: dholmes, lmesnik, cjplummer
1 parent b933136 commit 7023b3f

89 files changed

Lines changed: 284 additions & 284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/java.management/share/classes/com/sun/jmx/mbeanserver/DefaultMXBeanMappingFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
* @since 1.6
121121
*/
122122
public class DefaultMXBeanMappingFactory extends MXBeanMappingFactory {
123-
static abstract class NonNullMXBeanMapping extends MXBeanMapping {
123+
abstract static class NonNullMXBeanMapping extends MXBeanMapping {
124124
NonNullMXBeanMapping(Type javaType, OpenType<?> openType) {
125125
super(javaType, openType);
126126
}
@@ -936,7 +936,7 @@ final Object fromNonNullOpenValue(Object value)
936936
}
937937

938938
/** Converts from a CompositeData to an instance of the targetClass. */
939-
private static abstract class CompositeBuilder {
939+
private abstract static class CompositeBuilder {
940940
CompositeBuilder(Class<?> targetClass, String[] itemNames) {
941941
this.targetClass = targetClass;
942942
this.itemNames = itemNames;

src/java.management/share/classes/com/sun/jmx/mbeanserver/Introspector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* @since 1.5
6767
*/
6868
public class Introspector {
69-
final public static boolean ALLOW_NONPUBLIC_MBEAN;
69+
public static final boolean ALLOW_NONPUBLIC_MBEAN;
7070
static {
7171
@SuppressWarnings("removal")
7272
String val = AccessController.doPrivileged(new GetPropertyAction("jdk.jmx.mbeans.allowNonPublic"));

src/java.management/share/classes/com/sun/jmx/mbeanserver/MBeanServerDelegateImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 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
@@ -53,7 +53,7 @@ final class MBeanServerDelegateImpl
5353
extends MBeanServerDelegate
5454
implements DynamicMBean, MBeanRegistration {
5555

56-
final private static String[] attributeNames = new String[] {
56+
private static final String[] attributeNames = new String[] {
5757
"MBeanServerId",
5858
"SpecificationName",
5959
"SpecificationVersion",
@@ -106,22 +106,22 @@ public MBeanServerDelegateImpl () {
106106
null,getNotificationInfo());
107107
}
108108

109-
final public ObjectName preRegister (MBeanServer server, ObjectName name)
109+
public final ObjectName preRegister (MBeanServer server, ObjectName name)
110110
throws java.lang.Exception {
111111
if (name == null) return DELEGATE_NAME;
112112
else return name;
113113
}
114114

115-
final public void postRegister (Boolean registrationDone) {
115+
public final void postRegister (Boolean registrationDone) {
116116
}
117117

118-
final public void preDeregister()
118+
public final void preDeregister()
119119
throws java.lang.Exception {
120120
throw new IllegalArgumentException(
121121
"The MBeanServerDelegate MBean cannot be unregistered");
122122
}
123123

124-
final public void postDeregister() {
124+
public final void postDeregister() {
125125
}
126126

127127
/**

src/java.management/share/classes/com/sun/jmx/mbeanserver/MXBeanProxy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005, 2008, 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 @@ public void visitOperation(String operationName,
8989
}
9090
}
9191

92-
private static abstract class Handler {
92+
private abstract static class Handler {
9393
Handler(String name, ConvertingMethod cm) {
9494
this.name = name;
9595
this.convertingMethod = cm;

src/java.management/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,22 @@ else if (logger.traceOn())
146146
/**
147147
* Called to fetch notifications from a server.
148148
*/
149-
abstract protected NotificationResult fetchNotifs(long clientSequenceNumber,
149+
protected abstract NotificationResult fetchNotifs(long clientSequenceNumber,
150150
int maxNotifications,
151151
long timeout)
152152
throws IOException, ClassNotFoundException;
153153

154-
abstract protected Integer addListenerForMBeanRemovedNotif()
154+
protected abstract Integer addListenerForMBeanRemovedNotif()
155155
throws IOException, InstanceNotFoundException;
156156

157-
abstract protected void removeListenerForMBeanRemovedNotif(Integer id)
157+
protected abstract void removeListenerForMBeanRemovedNotif(Integer id)
158158
throws IOException, InstanceNotFoundException,
159159
ListenerNotFoundException;
160160

161161
/**
162162
* Used to send out a notification about lost notifs
163163
*/
164-
abstract protected void lostNotifs(String message, long number);
164+
protected abstract void lostNotifs(String message, long number);
165165

166166

167167
public synchronized void addNotificationListener(Integer listenerID,

src/java.management/share/classes/com/sun/jmx/remote/security/HashedPasswordManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
* clear-text password file. If generated by the user, hashed passwords must
8686
* follow the format specified above.
8787
*/
88-
final public class HashedPasswordManager {
88+
public final class HashedPasswordManager {
8989

9090
private static final class UserCredentials {
9191

src/java.management/share/classes/javax/management/MBeanServerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public static MBeanServer newMBeanServer(String domain) {
355355
* caller's permissions do not include or imply <code>{@link
356356
* MBeanServerPermission}("findMBeanServer")</code>.
357357
*/
358-
public synchronized static
358+
public static synchronized
359359
ArrayList<MBeanServer> findMBeanServer(String agentId) {
360360

361361
checkPermission("findMBeanServer");

src/java.management/share/classes/javax/management/ObjectName.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ private static class PatternProperty extends Property {
351351
/**
352352
* a shared empty array for empty property lists
353353
*/
354-
static final private Property[] _Empty_property_array = new Property[0];
354+
private static final Property[] _Empty_property_array = new Property[0];
355355

356356

357357
// Class private fields <==============================

src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class RequiredModelMBean
144144

145145
private static final JavaSecurityAccess javaSecurityAccess = SharedSecrets.getJavaSecurityAccess();
146146
@SuppressWarnings("removal")
147-
final private AccessControlContext acc = AccessController.getContext();
147+
private final AccessControlContext acc = AccessController.getContext();
148148

149149
/*************************************/
150150
/* constructors */

src/java.management/share/classes/javax/management/timer/Timer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 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
@@ -127,7 +127,7 @@ public class Timer extends NotificationBroadcasterSupport
127127
* Table containing all the timer notifications of this timer,
128128
* with the associated date, period and number of occurrences.
129129
*/
130-
final private Map<Integer,Object[]> timerTable =
130+
private final Map<Integer,Object[]> timerTable =
131131
new HashMap<>();
132132

133133
/**
@@ -162,7 +162,7 @@ public class Timer extends NotificationBroadcasterSupport
162162
* The notification counter ID.
163163
* Used to keep the max key value inserted into the timer table.
164164
*/
165-
volatile private int counterID = 0;
165+
private volatile int counterID = 0;
166166

167167
private java.util.Timer timer;
168168

0 commit comments

Comments
 (0)