mx4j/src/core/javax/management/modelmbean ModelMBeanInfoSupport.java,1.13,1.14
Simone Bordet <[email protected]> Tue, 07 Sep 2004 15:17:03 +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-serv14911/src/core/javax/management/modelmbean
Modified Files:
ModelMBeanInfoSupport.java
Log Message:
Fix for bug #952035: MMBInfoSupport.getDescriptors("mbean") throws exception.
Index: ModelMBeanInfoSupport.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean/ModelMBeanInfoSupport.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** ModelMBeanInfoSupport.java 7 Sep 2004 12:44:17 -0000 1.13
--- ModelMBeanInfoSupport.java 7 Sep 2004 15:17:01 -0000 1.14
***************
*** 42,51 ****
private MBeanOperationInfo[] modelMBeanOperations;
- // public ModelMBeanInfoSupport()
- // {
- // // Required by the spec but useless, since there are no setter for the metadata
- // this(null, null, new ModelMBeanAttributeInfo[0], new ModelMBeanConstructorInfo[0], new ModelMBeanOperationInfo[0], new ModelMBeanNotificationInfo[0], null);
- // }
-
public ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)
{
--- 42,45 ----
***************
*** 143,146 ****
--- 137,144 ----
return all;
}
+ else if (type.equals("mbean"))
+ {
+ return new Descriptor[]{getMBeanDescriptor()};
+ }
else if (type.equals("attribute"))
{
***************
*** 672,678 ****
for (int i = 0; i < features.length; ++i)
{
! if (features != null && features[i].getName().equals(name) && features[i] instanceof DescriptorAccess)
{
! return ((DescriptorAccess)features[i]).getDescriptor();
}
}
--- 670,677 ----
for (int i = 0; i < features.length; ++i)
{
! MBeanFeatureInfo feature = features[i];
! if (feature != null && feature.getName().equals(name) && feature instanceof DescriptorAccess)
{
! return ((DescriptorAccess)feature).getDescriptor();
}
}
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click