Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8276640: Use blessed modifier order in jfr code
Reviewed-by: mgronlun
  • Loading branch information
magicus committed Nov 4, 2021
1 parent 5acff75 commit 49b7b2e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/jdk.jfr/share/classes/jdk/jfr/internal/FilePurger.java
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/jdk.jfr/share/classes/jdk/jfr/internal/JVM.java
Expand Up @@ -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
Expand Down
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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) {
Expand Down

1 comment on commit 49b7b2e

@openjdk-notifier
Copy link

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.