This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: java.util.HashMap merged
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 5 May 2004 10:28:45 +0200
- Subject: Patch: java.util.HashMap merged
Hi list,
I just merged the attached patch to merge java.util.HashMap with
classpath again.
Michael
2004-05-05 Mark Wielaard <mark@klomp.org>
Reported by f.haeglsperger@gmx.de [classpath patch #2485]
* java/util/HashMap.java (rehash): Add entry at start of bucket.
Index: java/util/HashMap.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/HashMap.java,v
retrieving revision 1.17
diff -u -r1.17 HashMap.java
--- java/util/HashMap.java 23 Apr 2004 06:36:04 -0000 1.17
+++ java/util/HashMap.java 5 May 2004 08:27:48 -0000
@@ -743,18 +743,9 @@
{
int idx = hash(e.key);
HashEntry dest = buckets[idx];
-
- if (dest != null)
- {
- while (dest.next != null)
- dest = dest.next;
- dest.next = e;
- }
- else
- buckets[idx] = e;
-
HashEntry next = e.next;
- e.next = null;
+ e.next = buckets[idx];
+ buckets[idx] = e;
e = next;
}
}