Skip to content
Permalink
Browse files
8276640: Use blessed modifier order in jfr code
Reviewed-by: mgronlun
  • Loading branch information
magicus committed Nov 4, 2021
1 parent 5acff75 commit 49b7b2ea0971fe99567bdbd962d63b90ff2eeefd
Showing 5 changed files with 7 additions and 7 deletions.
@@ -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 @@ private 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 synchronized List<PlatformRecording> getRecordings() {
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 synchronized static void addListener(FlightRecorderListener changeListene
}
}

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 @@
* 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) {

1 comment on commit 49b7b2e

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 49b7b2e Nov 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.