8009996: tests javax/management/mxbean/MiscTest.java and javax/management/mxbean/StandardMBeanOverrideTest.java fail

Reviewed-by: dfuchs, dholmes
This commit is contained in:
Jaroslav Bachorik 2013-03-18 11:17:06 +01:00
parent 2774999b75
commit 09f414379d

View File

@ -258,6 +258,11 @@ public class StandardEmitterMBean extends StandardMBean
} }
public MBeanNotificationInfo[] getNotificationInfo() { public MBeanNotificationInfo[] getNotificationInfo() {
// this getter might get called from the super constructor
// when the notificationInfo has not been properly set yet
if (notificationInfo == null) {
return NO_NOTIFICATION_INFO;
}
if (notificationInfo.length == 0) { if (notificationInfo.length == 0) {
return notificationInfo; return notificationInfo;
} else { } else {