jdk/src/java.base/share/classes/java/util/Arrays.java
changeset 31540 6efd719b3330
parent 29223 a9f00e8ae58b
child 31678 7a5da9274448
--- a/jdk/src/java.base/share/classes/java/util/Arrays.java	Thu Jul 09 09:55:36 2015 -0400
+++ b/jdk/src/java.base/share/classes/java/util/Arrays.java	Mon Jun 29 15:02:35 2015 -0700
@@ -3820,7 +3820,7 @@
 
         @Override
         public Object[] toArray() {
-            return a.clone();
+            return Arrays.copyOf(a, a.length, Object[].class);
         }
 
         @Override