public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Patch: FYI: import jmx fix from classpath
@ 2007-02-16 19:18 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2007-02-16 19:18 UTC (permalink / raw)
  To: GCJ-patches

I'm checking this in on the trunk & the RH 4.1 branch.

This pulls in a jxm fix from classpath.

Tom

Index: ChangeLog
from  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.

Index: javax/management/MBeanInfo.java
===================================================================
--- javax/management/MBeanInfo.java	(revision 122049)
+++ javax/management/MBeanInfo.java	(working copy)
@@ -160,34 +160,26 @@
   {
     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();
   }
 
   /**

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-16 19:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 19:18 Patch: FYI: import jmx fix from classpath Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).