提交 1d53838f 编写于 作者: S sjiang

8132210: Reinforce JMX collector internals

Reviewed-by: dfuchs, ahgross
上级 4f4f27bc
......@@ -102,17 +102,13 @@ class GarbageCollectorImpl extends MemoryManagerImpl
GarbageCollectionNotificationInfo.GARBAGE_COLLECTION_NOTIFICATION
};
private MBeanNotificationInfo[] notifInfo = null;
@Override
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册