mx4j/src/core/javax/management/modelmbean ModelMBeanInfoSupport.java,1.17,1.18

Jeremy Boynes <[email protected]> Wed, 09 Feb 2005 07:07:58 +0000
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12843/src/core/javax/management/modelmbean

Modified Files:
	ModelMBeanInfoSupport.java 
Log Message:
Fix for [ 1116620 ] ModelMBeanInfo should not return null

Index: ModelMBeanInfoSupport.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean/ModelMBeanInfoSupport.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ModelMBeanInfoSupport.java	13 Nov 2004 16:38:43 -0000	1.17
--- ModelMBeanInfoSupport.java	9 Feb 2005 07:07:56 -0000	1.18
***************
*** 30,33 ****
--- 30,38 ----
  public class ModelMBeanInfoSupport extends MBeanInfo implements ModelMBeanInfo, Serializable
  {
+    private static final MBeanAttributeInfo[] EMPTY_ATTRS = {};
+    private static final MBeanConstructorInfo[] EMPTY_CTRS = {};
+    private static final MBeanNotificationInfo[] EMPTY_NOTIFICATIONS = {};
+    private static final MBeanOperationInfo[] EMPTY_OPS = {};
+ 
     private static final long serialVersionUID = -1935722590756516193L;
  
***************
*** 49,56 ****
     {
        super(className, description, attributes, constructors, operations, notifications);
!       modelMBeanAttributes = attributes;
!       modelMBeanConstructors = constructors;
!       modelMBeanNotifications = notifications;
!       modelMBeanOperations = operations;
        checkAndSetDescriptor(mbeanDescriptor);
     }
--- 54,61 ----
     {
        super(className, description, attributes, constructors, operations, notifications);
!       modelMBeanAttributes = attributes != null ? attributes : EMPTY_ATTRS;
!       modelMBeanConstructors = constructors != null ? constructors : EMPTY_CTRS;
!       modelMBeanNotifications = notifications != null ? notifications : EMPTY_NOTIFICATIONS;
!       modelMBeanOperations = operations != null ? operations : EMPTY_OPS;
        checkAndSetDescriptor(mbeanDescriptor);
     }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click