You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhancement contract : cater for serialisation of detachedState when user has overridden writeObject/writeReplace without calling "defaultWriteObject"
#35
Open
andyjefferson opened this issue
Apr 11, 2016
· 0 comments
The enhancement contract will cater for normal Java serialisation where a user doesn't change the default process, OR where they make use of out.defaultWriteObject(). The dnDetachedState field is serialised/deserialised since not transient.
If the user deviates from this then it will not be serialised, and hence detached state is lost.
We would want to detect the overriding of writeObject/writeReplace and the absence of a call to defaultWriteObject (defaultReadObject) and in that case add on
out.writeObject(dnDetachedState);
as well as
dnDetachedState = (Object[])in.readObject();
The text was updated successfully, but these errors were encountered:
andyjefferson
changed the title
Enhancement to cater for serialisation of detachedState when user has overridden writeObject/writeReplace
Enhancement contract : cater for serialisation of detachedState when user has overridden writeObject/writeReplace
Sep 15, 2017
andyjefferson
changed the title
Enhancement contract : cater for serialisation of detachedState when user has overridden writeObject/writeReplace
Enhancement contract : cater for serialisation of detachedState when user has overridden writeObject/writeReplace without calling "defaultWriteObject"
Jul 27, 2018
The enhancement contract will cater for normal Java serialisation where a user doesn't change the default process, OR where they make use of
out.defaultWriteObject()
. ThednDetachedState
field is serialised/deserialised since not transient.If the user deviates from this then it will not be serialised, and hence detached state is lost.
We would want to detect the overriding of
writeObject
/writeReplace
and the absence of a call todefaultWriteObject
(defaultReadObject
) and in that case add onout.writeObject(dnDetachedState);
as well as
dnDetachedState = (Object[])in.readObject();
The text was updated successfully, but these errors were encountered: