Serialization patch and question

Alexandre Oliva oliva at
Wed Feb 3 10:36:39 PST 1999

On Feb  3, 1999, Godmar Back <gback at> wrote:

>> Before I start working on this, is there any chance of using default
>> Object.equals() and Object.hashCode() methods on an object of a derived
>> class, which redefines them as something else, besides "going native"?

> I am not sure I understand everything you say, but there is
> System.identityHashCode(Object o), which return the hashcode that would
> be returned if Object.hashCode() is not overridden.

> In Kaffe, it returns the address of the object --- which opens a whole
> new can of worms once we'll use moving collectors.

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)

Alexandre Oliva  aoliva@{}
Universidade Estadual de Campinas, SP, Brasil

More information about the kaffe mailing list