Commit d16c4b1a by Edwin Steiner Committed by Tom Tromey

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
parent fa681e39
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>
* gnu/java/lang/management/MemoryMXBeanImpl.java,
......@@ -160,34 +160,26 @@ public class MBeanInfo
{
className = name;
description = desc;
if (attribs == null)
attributes = new MBeanAttributeInfo[0];
else
{
attributes = new MBeanAttributeInfo[attribs.length];
System.arraycopy(attribs, 0, attributes, 0, attribs.length);
}
attributes = (MBeanAttributeInfo[]) attribs.clone();
if (cons == null)
constructors = new MBeanConstructorInfo[0];
else
{
constructors = new MBeanConstructorInfo[cons.length];
System.arraycopy(cons, 0, constructors, 0, cons.length);
}
constructors = (MBeanConstructorInfo[]) cons.clone();
if (ops == null)
operations = new MBeanOperationInfo[0];
else
{
operations = new MBeanOperationInfo[ops.length];
System.arraycopy(ops, 0, operations, 0, ops.length);
}
operations = (MBeanOperationInfo[]) ops.clone();
if (notifs == null)
notifications = new MBeanNotificationInfo[0];
else
{
notifications = new MBeanNotificationInfo[notifs.length];
System.arraycopy(notifs, 0, notifications, 0, notifs.length);
}
notifications = (MBeanNotificationInfo[]) notifs.clone();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment