final transient fields serialization
pawel.veselov at gmail.com
Mon Nov 9 21:30:28 UTC 2009
it again caught my attention, and I though that may be there is something
that can be done about this.
The issue is obvious -- having 'final transient' instance fields makes
little sense if the object is ever serialized.
Logically, there may be perfect reasoning behind making an instance field
final, as well as transient, in which case there is then no mechanism to
reinitialize this field on object deserialization.
It seems that it would be nice if either the final fields were initialized
in a separate block that would be executed on deserialization, or if
readObject() could set them. After all you can have a code block that sets
the final fields. Not sure how feasible that is, but IMHO, that is a short
With best of best regards
Pawel S. Veselov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the core-libs-dev