This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Patch: Fix IdentityHashMap Error


>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> 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  <rmathew@hotmail.com>

	* 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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]