8276640: Use blessed modifier order in jfr code

Reviewed-by: mgronlun
This commit is contained in:
Magnus Ihse Bursie 2021-11-04 15:06:08 +00:00
parent 5acff75379
commit 49b7b2ea09
5 changed files with 7 additions and 7 deletions
src/jdk.jfr/share/classes/jdk/jfr/internal

@ -38,14 +38,14 @@ final class FilePurger {
private static final Set<SafePath> paths = new LinkedHashSet<>();
public synchronized static void add(SafePath p) {
public static synchronized void add(SafePath p) {
paths.add(p);
if (paths.size() > 1000) {
removeOldest();
}
}
public synchronized static void purge() {
public static synchronized void purge() {
if (paths.isEmpty()) {
return;
}

@ -211,7 +211,7 @@ public final class JVM {
*
* @throws IllegalStateException if wrong JVMTI phase.
*/
public native synchronized void retransformClasses(Class<?>[] classes);
public synchronized native void retransformClasses(Class<?>[] classes);
/**
* Enable event

@ -143,7 +143,7 @@ public final class PlatformRecorder {
return Collections.unmodifiableList(new ArrayList<PlatformRecording>(recordings));
}
public synchronized static void addListener(FlightRecorderListener changeListener) {
public static synchronized void addListener(FlightRecorderListener changeListener) {
@SuppressWarnings("removal")
AccessControlContext context = AccessController.getContext();
SecureRecorderListener sl = new SecureRecorderListener(context, changeListener);
@ -157,7 +157,7 @@ public final class PlatformRecorder {
}
}
public synchronized static boolean removeListener(FlightRecorderListener changeListener) {
public static synchronized boolean removeListener(FlightRecorderListener changeListener) {
for (SecureRecorderListener s : new ArrayList<>(changeListeners)) {
if (s.getChangeListener() == changeListener) {
changeListeners.remove(s);

@ -51,7 +51,7 @@ import jdk.jfr.internal.management.EventSettingsModifier;
* java.lang.reflect.
*/
public abstract class PrivateAccess {
private volatile static PrivateAccess instance;
private static volatile PrivateAccess instance;
public static PrivateAccess getInstance() {
// Can't be initialized in <clinit> because it may

@ -117,7 +117,7 @@ public final class JDKEvents {
private static boolean initializationTriggered;
@SuppressWarnings("unchecked")
public synchronized static void initialize() {
public static synchronized void initialize() {
try {
if (initializationTriggered == false) {
for (Class<?> mirrorEventClass : mirrorEventClasses) {