Java Reference
In-Depth Information
14.6. Failure to declare a serial version UID causes fragility
Prescription: Declare an explicit serial version UID in serializable classes.
References: [EJ Items 54 and 55].
14.7. If readObject or readResolve invokes overridable methods,
deserializing cyclic object graphs can cause corruption
Prescription: If a HashSet , HashMap , or Hashtable will be serialized, ensure that its contents do
not refer back to it.
In readObject and readResolve methods, avoid invoking methods on objects currently being
deserialized. If you must violate this advice, ensure that no problematic cycles exist in the object
graph.
References: Puzzle 91 .
< Day Day Up >
 
 
Search WWH ::




Custom Search