[kaffe] How to make Saxon 7.2 work with kaffe

Ito Kazumitsu ito.kazumitsu@hitachi-cable.co.jp
Thu, 10 Oct 2002 08:41:10 +0900


In message "Re: [kaffe] How to make Saxon 7.2 work with kaffe"
    on 02/10/09, Dalibor Topic <robilad@yahoo.com> writes:

> I wasn't precise enough in my question. I was
> wondering about the methods you added to classpath's
> WeakHashMap implementation (equals(Object, Object) and
> hash(Object), I believe). Why are these methods
> necessary?

Added methods are:

+  // The following methods were copied from
+  // AbstractMap of classpath because kaffe's does not have ones.
+  static final boolean equals(Object o1, Object o2)
+  {
+    return o1 == null ? o2 == null : o1.equals(o2);
+  }
+  static final int hashCode(Object o)
+  {
+    return o == null ? 0 : o.hashCode();
+  }

These are used in WeakHashMap of GNU Classpath and are defined
in AbstractMap of GNU classpath which WeakHashMap extends.

I am afraid copying AbstractMap of GNU classpath to kaffe
will make things difficult, so I copied from classpath
only WeakHashMap.java and used kaffe's AbstractMap which
does not define the said methods.