Eric Blake wrote:

>Thanks for all the recent comments on my contributions in
>java.util.Hashtable, HashMap, and such.  Where people have cast doubt on
>the efficiency of my prior patches, I've reverted those.
>
Thanks Eric.

You introduced a bug in Hashtable.toString, I'm checking in the fix:

--- java/util/Hashtable.java    2001/09/20 23:38:12     1.17
+++ java/util/Hashtable.java    2001/09/25 01:01:33
@@ -557,7 +557,7 @@
     for (int pos = size; pos > 0; pos--)
       {
         r.append(entries.next());
-        if (pos == 1)
+        if (pos > 1)
           r.append(", ");
       }
     r.append("}");

>I also just added LinkedHashMap (new in JDK 1.4), and would like another
>pair of eyes to look over my work to check for any glaring bugs or items
>that could be improved. 
>
Looking at LinkedHashMap, I think it would make sense to change the 
HashMap.clone() to simply call putAll(this). This way we get rid of a 
bunch of clone related code, and it should not be significantly less 
efficient.

regards

Bryce.



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to