changeset 11315:37a767033a83

8137060: JMX memory management improvements Reviewed-by: dfuchs, ahgross
author sjiang
date Tue, 06 Oct 2015 09:20:12 +0200
parents 944e003d9c67
children ab54163c8610
files src/share/classes/sun/management/MemoryImpl.java
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/management/MemoryImpl.java	Tue Sep 29 11:36:50 2015 -0700
+++ b/src/share/classes/sun/management/MemoryImpl.java	Tue Oct 06 09:20:12 2015 +0200
@@ -115,17 +115,10 @@
         "Memory usage exceeds collection usage threshold"
     };
 
-    private MBeanNotificationInfo[] notifInfo = null;
     public MBeanNotificationInfo[] getNotificationInfo() {
-        synchronized (this) {
-            if (notifInfo == null) {
-                 notifInfo = new MBeanNotificationInfo[1];
-                 notifInfo[0] = new MBeanNotificationInfo(notifTypes,
-                                                          notifName,
-                                                          "Memory Notification");
-            }
-        }
-        return notifInfo;
+        return new MBeanNotificationInfo[] {
+            new MBeanNotificationInfo(notifTypes, notifName, "Memory Notification")
+        };
     }
 
     private static String getNotifMsg(String notifType) {