In message "java.util.Hashtable: difference between JDK and kaffe"
    on 01/01/26, Ito Kazumitsu <[EMAIL PROTECTED]> writes:

> And the cause of the problem seems to be in the different
> behaviour of kaffe's java.util.Hashtable from that of JDK's.

Attached patch solves this problem.

bash$ diff -u ~/kaffe/cvs/kaffe/libraries/javalib/java/util/HashMap.java HashMap.java
--- /home/ito/kaffe/cvs/kaffe/libraries/javalib/java/util/HashMap.java  Fri Apr  7 
06:46:16 2000
+++ HashMap.java        Fri Jan 26 17:22:35 2001
@@ -234,7 +234,8 @@
 
        private Entry find(Object key, int bucket) {
                for (Entry e = table[bucket]; e != null; e = e.next) {
-                       if (key == null ? e.key == null : key.equals(e.key)) {
+                       // if (key == null ? e.key == null : key.equals(e.key)) {
+                       if (e.key == null ? key == null : (e.key).equals(key)) {
                                return e;
                        }
                }
bash$

Reply via email to