[kaffe] DefaultSerialization

Patrick Tullmann tullmann at cs.utah.edu
Wed Sep 18 13:47:41 PDT 2002

Stuart wrote:
> My guess is that these classes date back to when JDK1.1 was common. 
> IIRC, at that point the only available serialization technique was to 
> implement Serializable (and have your private instance variables 
> directly yanked out from under you and dumped to disk) or to implement 
> Externalizable

I think this is right.  Looking at the DefaultSerialization classes in
java.awt.Component and java.math.BigInteger makes that pretty clear.
The Hashtable serialization stuff must have been updated, though,
since it was sort of using the now-standard readObject/writeObject.

I've fixed Hashtable, Hashmap and BigInteger to use
readObject/writeObject to generate sun-compatible serializations
(haven't tested it too much yet, but I don't forsee any major

However, java.awt.Component has this note in it:
  While this is serializing something like what JDK expects, we don't
  handle the more complex things like Properties or popupMenus yet
  (because I'm not sure how to convert what we do into what they

So, I'm wondering if its worthwhile to update to
readObject/writeObject, or if I can punt on sun-compatible
Serialization for java.awt.Component?  Do apps actually serialize AWT
components?  Unless someone hollers, I'm going to drop the
awkward-and-incompatible Component serialization in favor of
straightforwardly incompatible Component serialization.

Also, if anyone has a clue about other types that should be tested for
sun-serialization compatibility, let me know.

> Anyone feel like doing some CVS archeology and finding out when 
> DefaultSerialization was introduced in Kaffe, and trying to determine 
> which JDK release was current at the time?

The BigInteger serialization stuff looks like its from April of `99,
which is a good 4 months after JDK1.2 shipped (*).  But, that could
just be the date of the merge of pre-existing code from
transvirtual's private Kaffe tree...

(*) http://java.sun.com/features/2000/06/time-line.html


----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
     "VR Cows are a medium rarely well done." -- someone in c.g.a

More information about the kaffe mailing list