re PR classpath/28652 (JBoss fails to start due class cast exception in the management classes)
2006-10-14 Edwin Steiner <edwin.steiner@gmx.net> PR classpath/28652: * javax/management/MBeanInfo.java (MBeanInfo): Use clone to duplicate the arrays in order to preserve the array type. From-SVN: r122050
This commit is contained in:
parent
fa681e3960
commit
d16c4b1a16
3 changed files with 15 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-10-14 Edwin Steiner <edwin.steiner@gmx.net>
|
||||||
|
|
||||||
|
PR classpath/28652:
|
||||||
|
* javax/management/MBeanInfo.java (MBeanInfo):
|
||||||
|
Use clone to duplicate the arrays in order to
|
||||||
|
preserve the array type.
|
||||||
|
|
||||||
2007-02-16 Andrew Haley <aph@redhat.com>
|
2007-02-16 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
* gnu/java/lang/management/MemoryMXBeanImpl.java,
|
* gnu/java/lang/management/MemoryMXBeanImpl.java,
|
||||||
|
|
|
@ -160,34 +160,26 @@ public class MBeanInfo
|
||||||
{
|
{
|
||||||
className = name;
|
className = name;
|
||||||
description = desc;
|
description = desc;
|
||||||
|
|
||||||
if (attribs == null)
|
if (attribs == null)
|
||||||
attributes = new MBeanAttributeInfo[0];
|
attributes = new MBeanAttributeInfo[0];
|
||||||
else
|
else
|
||||||
{
|
attributes = (MBeanAttributeInfo[]) attribs.clone();
|
||||||
attributes = new MBeanAttributeInfo[attribs.length];
|
|
||||||
System.arraycopy(attribs, 0, attributes, 0, attribs.length);
|
|
||||||
}
|
|
||||||
if (cons == null)
|
if (cons == null)
|
||||||
constructors = new MBeanConstructorInfo[0];
|
constructors = new MBeanConstructorInfo[0];
|
||||||
else
|
else
|
||||||
{
|
constructors = (MBeanConstructorInfo[]) cons.clone();
|
||||||
constructors = new MBeanConstructorInfo[cons.length];
|
|
||||||
System.arraycopy(cons, 0, constructors, 0, cons.length);
|
|
||||||
}
|
|
||||||
if (ops == null)
|
if (ops == null)
|
||||||
operations = new MBeanOperationInfo[0];
|
operations = new MBeanOperationInfo[0];
|
||||||
else
|
else
|
||||||
{
|
operations = (MBeanOperationInfo[]) ops.clone();
|
||||||
operations = new MBeanOperationInfo[ops.length];
|
|
||||||
System.arraycopy(ops, 0, operations, 0, ops.length);
|
|
||||||
}
|
|
||||||
if (notifs == null)
|
if (notifs == null)
|
||||||
notifications = new MBeanNotificationInfo[0];
|
notifications = new MBeanNotificationInfo[0];
|
||||||
else
|
else
|
||||||
{
|
notifications = (MBeanNotificationInfo[]) notifs.clone();
|
||||||
notifications = new MBeanNotificationInfo[notifs.length];
|
|
||||||
System.arraycopy(notifs, 0, notifications, 0, notifs.length);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue