classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Re: RFA: Patch: Fix IdentityHashMap Error


From: Tom Tromey
Subject: [cp-patches] Re: RFA: Patch: Fix IdentityHashMap Error
Date: 05 Jan 2005 11:57:06 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Ranjit" == Ranjit Mathew <address@hidden> writes:

Ranjit> Thanks, I've committed this to mainline.
Ranjit> Can someone please propagate this to Classpath?

I'm finally doing this.  Classpath folks, the patch is appended.

Tom

Index: ChangeLog
from  Ranjit Mathew  <address@hidden>

        * java/util/IdentityHashMap.java (put): Replace mistaken use
        of "<<" by "*".

Index: java/util/IdentityHashMap.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/IdentityHashMap.java,v
retrieving revision 1.15
diff -u -r1.15 IdentityHashMap.java
--- java/util/IdentityHashMap.java 22 Oct 2004 17:15:57 -0000 1.15
+++ java/util/IdentityHashMap.java 5 Jan 2005 19:00:23 -0000
@@ -492,7 +492,7 @@
         Object[] old = table;
         // This isn't necessarily prime, but it is an odd number of key/value
         // slots, which has a higher probability of fewer collisions.
-        table = new Object[old.length << 1 + 2];
+        table = new Object[(old.length * 2) + 2];
         Arrays.fill(table, emptyslot);
         size = 0;
         threshold = (table.length >>> 3) * 3;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]