Grokbase Groups Cayenne dev June 2012
FAQ
I'm reading that the deserialization mechanism takes the serialVersionUID of all superclasses into account.
So yes the serialVersionUID needs to be set on each class, and subclasses can retain their serialVersionUID even if the superclass' serialVersionUID changes.
Also, if a class does not have any serializable fields, it can simply have a fixed serialVersionUID that never changes, say, 1L (that's the common way to say "this class does not have anything serializable", or "this class will never change", or "I'm taking responsibility for manually bumping up the servialVersionUID whenever a serialization-relevant change happens").

That's what I gather from reading various sources in the web.
I'm not seeing any official mention of the issue, unfortunately.
I guess this means reading the source, and/or testing with as many JDKs as humanly possible.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 15 of 27 | next ›
Discussion Overview
groupdev @
categoriescayenne
postedJun 14, '12 at 2:07p
activeJul 18, '13 at 1:50p
posts27
users5
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase