JDK-4031781 : readObject() Not Called Unless writeObject() is implemented
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io:serialization
  • Affected Version: 1.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_95
  • CPU: x86
  • Submitted: 1997-02-12
  • Updated: 1997-02-13
  • Resolved: 1997-02-13
Related Reports
Duplicate :  
Description

Name: mc57594			Date: 02/11/97


It appears that a serializable class' readObject() method
(if implemented) does not get called unless that class also
implements the writeObject() method.

This behavior is not documented and should not be required. The
readObject() method will often be used to re-create transient
property values which are required to completely reconstitute
the object in question. In many cases, this will not require any
additional data be read from the serialized object. It therefore
makes no sense to force the writeObject method to be implemented.
company  -  HMS Software  , email  -  ###@###.###
======================================================================

Comments
EVALUATION Duplicate of BugId 4024074, fixed in JDK1.1FCS
11-06-2004

WORK AROUND Name: mc57594 Date: 02/11/97 Go ahead and implement the writeObject() method and only have it call writeDefaultObject(). ======================================================================
11-06-2004

PUBLIC COMMENTS This bug is fixed in JDK1.1 FCS
10-06-2004