harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r693001 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
Date Mon, 08 Sep 2008 07:13:19 GMT
Author: tonywu
Date: Mon Sep  8 00:13:18 2008
New Revision: 693001

URL: http://svn.apache.org/viewvc?rev=693001&view=rev
Log:
There is no reason to use clone to create a new array here. 

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java?rev=693001&r1=693000&r2=693001&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java Mon
Sep  8 00:13:18 2008
@@ -337,7 +337,7 @@
     public synchronized Object clone() {
         try {
             Hashtable<K, V> hashtable = (Hashtable<K, V>) super.clone();
-            hashtable.elementData = elementData.clone();
+            hashtable.elementData = new Entry[elementData.length];
             Entry<K, V> entry;
             for (int i = elementData.length; --i >= 0;) {
                 if ((entry = elementData[i]) != null) {



Mime
View raw message