Re: More on java.util.HashMap...

2001-09-24 Thread Bryce McKinlay

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.java2001/09/20 23:38:12 1.17
+++ java/util/Hashtable.java2001/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



More on java.util.HashMap...

2001-09-20 Thread Eric Blake

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.

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.  Now, I need to find time to write some Mauve
tests for these fixes...
-- 
This signature intentionally left boring.

Eric Blake [EMAIL PROTECTED]
  BYU student, free software programmer

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