Details
-
Type: Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.2
-
Component/s: None
-
Labels:None
-
JDK version and platform:1.4.2_10 for Windows
Description
If object implements readResolve() method it is called twise: once before the attributes are assigned and once after.
This is different from Sun Serialization specification. The readResolve should be called only once after object is fully constructed and all values assigned.
Here is the quote from Sun Serialization specification:
"The readResolve method is not invoked on the object until the object is fully
constructed"
Issue Links
- is depended upon by
-
XSTR-317 XStream 1.2 release coordination.
Hi Dimitry,
we have a unit test, that ensures, that this normally does not happen: http://fisheye.codehaus.org/browse/xstream/trunk/xstream/src/test/com/thoughtworks/acceptance/SerializationCallbackOrderTest.java?r=797
So can you elaborate more about the circumstances, where this happens for you or - even better - provide a test case?