Serialization patch and question

Jose Orlando Pereira jop at
Wed Feb 3 11:33:58 PST 1999

Alexandre Oliva wrote:
> Once we start using moving collectors, we'll have to hack
> Object.hashCode() (and identityHashCode) so that they keep returning
> the same value even after the object moves.  The hashcode of an object
> cannot change during its lifetime (and I'm not sure it should change
> after WriteObject | ReadObject)

I think it is ok to consider writeObject followed by readObject as deep
cloning, i.e. hashCode may change unless it is overriden to use the
contents of the object. The same goes for equals().

Jose Orlando Pereira
* mailto:jop at * *

More information about the kaffe mailing list