[kaffe] Serialization

Guilhem Lavaux guilhem at kaffe.org
Sun Aug 10 08:14:02 PDT 2003


I nearly managed to get Classpath's serialization up to kaffe's level 
and at the
same time keeping the advantage of it. However, it is "nearly". As I said to
Mark Wielaard, kaffe's regression tests TestSerialVersions.Test0007, 
Test0010, Test0011, Test0013 fails; but also TestSerialFields.Test0010 and
Test0015. These tests are problematic because it seems the field 
has an effect on the deserialization. The specification is not really 
clear for that
point although all documentation I came across says 
serialPersistentFields is normally only used
for serialization. I checked JDK: except for one test, its output is the 
as the expected one (which means kaffe's previous implementation was right
except for one test).

What is your opinion on that ? The spec of serialization says:
"By using |serialPersistentFields| to define the Serializable fields for 
a class,
there no longer is a limitation that a serializable field must be a 
field within
the current definition of the |Serializable| class. The |writeObject| 
and |readObject|
methods of the |Serializable| class can map the current implementation 
of the
class to the serializable fields of the class using the interface that 
is described
in Section 1.7 "Accessing Serializable Fields of a Class
Therefore, the fields for a |Serializable| class can change in a later 
release, as
long as it maintains the mapping back to its Serializable fields that 
must remain
compatible across release boundaries."

However I cam across an RMI's documentation which says 
serialPersistentFields should
only be used for writing objects and not reading them.

So ?


More information about the kaffe mailing list