8009996: tests javax/management/mxbean/MiscTest.java and javax/management/mxbean/StandardMBeanOverrideTest.java fail
authorjbachorik
Mon, 18 Mar 2013 11:17:06 +0100
changeset 18195 7ea73f748935
parent 18194 3219612ef61c
child 18196 07dfacf3d73e
8009996: tests javax/management/mxbean/MiscTest.java and javax/management/mxbean/StandardMBeanOverrideTest.java fail Reviewed-by: dfuchs, dholmes
jdk/src/share/classes/javax/management/StandardEmitterMBean.java
--- a/jdk/src/share/classes/javax/management/StandardEmitterMBean.java	Fri Mar 15 12:31:57 2013 -0700
+++ b/jdk/src/share/classes/javax/management/StandardEmitterMBean.java	Mon Mar 18 11:17:06 2013 +0100
@@ -258,6 +258,11 @@
     }
 
     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) {
             return notificationInfo;
         } else {