Name: rlT66838 Date: 09/02/99
The API documentation for java.io.Serializable contains the
following paragraph:
"To allow subtypes of non-serializable classes to be serialized, the subtype may assume responsibility for saving and restoring the state of the supertype's
public, protected, and (if accessible) package fields. The subtype may assume this responsibility only if the class it extends has an accessible no-arg
constructor to initialize the class's state. It is an error to declare a class Serializable in this case. The error will be detected at runtime."
The third sentence is incomprehensible and should probably read:
"It is an error to declare a class Serializable <if this is not the> case".
Alternatively, parts of the Object Serialization Specification could be copied:
(http://www.javasoft.com/products/jdk/1.2/docs/guide/serialization/spec/serial-arch.doc10.html)
"A Serializable class must do the following:
. Implement the java.io.Serializable interface
. Identify the fields that should be serializable
(Use the serialPersistentFields member to explicitly declare them serializable or use the transient keyword to denote
nonserializable fields.)
. Have access to the no-arg constructor of its first nonserializable superclass"
(Review ID: 94436)
======================================================================