jdk/test/javax/management/mxbean/ThreadMXBeanTest.java
changeset 1004 5ba8217eb504
parent 2 90ce3da70b43
child 1247 b4c26443dee5
--- a/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java	Thu Jul 31 14:20:11 2008 +0200
+++ b/jdk/test/javax/management/mxbean/ThreadMXBeanTest.java	Thu Jul 31 15:31:13 2008 +0200
@@ -46,7 +46,8 @@
         long[] ids1 = proxy.getAllThreadIds();
 
         // Add some random ids to the list so we'll get back null ThreadInfo
-        long[] ids2 = Arrays.copyOf(ids1, ids1.length + 10);
+        long[] ids2 = new long[ids1.length + 10];
+        System.arraycopy(ids1, 0, ids2, 0, ids1.length);
         Random r = new Random();
         for (int i = ids1.length; i < ids2.length; i++)
             ids2[i] = Math.abs(r.nextLong());