--- a/jdk/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectorExtImpl.java Mon Sep 07 18:58:41 2015 +0300
+++ b/jdk/src/jdk.management/share/classes/com/sun/management/internal/GarbageCollectorExtImpl.java Tue Sep 08 08:34:35 2015 +0200
@@ -81,17 +81,12 @@
GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION
};
- private MBeanNotificationInfo[] notifInfo = null;
public MBeanNotificationInfo[] getNotificationInfo() {
- synchronized (this) {
- if (notifInfo == null) {
- notifInfo = new MBeanNotificationInfo[1];
- notifInfo[0] = new MBeanNotificationInfo(gcNotifTypes,
- notifName,
- "GC Notification");
- }
- }
- return notifInfo;
+ return new MBeanNotificationInfo[]{
+ new MBeanNotificationInfo(gcNotifTypes,
+ notifName,
+ "GC Notification")
+ };
}
private static long seqNumber = 0;