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
Serialization of MemberBox with a non-null delegateTo field is broken: the field is declared transient, but never restored upon deserialization. This results in incorrectly deserialized objects.
It can be fixed in two ways:
fail early: throw an exception from writeObject if serialization is attempted with a non-null delegateTo.
make it work: make the field non-transient.
Now, it's only NativeError that uses the delegate mechanism, and is typically setting it to otherwise serializable values. It seems to me that making the field non-transient is harmless. It was originally made transient in d357f56 11 years ago by @norrisboyd; not sure why – possibly due to a mistake?
Note that making it non-transient will change the serialization format of MemberBox, though.
The text was updated successfully, but these errors were encountered:
Serialization of
MemberBox
with a non-nulldelegateTo
field is broken: the field is declared transient, but never restored upon deserialization. This results in incorrectly deserialized objects.It can be fixed in two ways:
writeObject
if serialization is attempted with a non-nulldelegateTo
.Now, it's only
NativeError
that uses the delegate mechanism, and is typically setting it to otherwise serializable values. It seems to me that making the field non-transient is harmless. It was originally made transient in d357f56 11 years ago by @norrisboyd; not sure why – possibly due to a mistake?Note that making it non-transient will change the serialization format of MemberBox, though.
The text was updated successfully, but these errors were encountered: