Serializable
classes whose serialPersistentFields
field
is not declared as private static final ObjectStreamField[]
.
If a serialPersistentFields
field is not declared with those modifiers,
the serialization behavior will be as if the field was not declared at all.
Example:
class List implements Serializable {
List next;
ObjectStreamField[] serialPersistentFields
= {new ObjectStreamField("next", List.class)};
}