cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: Eclipse warning concerning serializable classes
Date Sat, 20 Nov 2004 17:38:02 GMT
Niclas Hedhman wrote:
> On Saturday 20 November 2004 08:16, Vadim Gritsenko wrote:
>>No! "1" is not "The stream-unique identifier".
> Vadim, I don't know where you get that 1L wouldn't work... But it does (and I 
> kind of know what I am talking about).

Only from the Sun doc - I've not taken my time reading their serialization 
source code. Doc gives impression that it is gotta be universally unique number.

> The serialVersionUID is used to determine the compatibility between a loaded 
> class and the serialized object of such class. There is not much more to it.
> The serialver executable is provided so that you can figure out the 
> serialVerUID after the fact of releasing your code first time.


> So, i.e. you can use any number you want, and your challenge is to figure out 
> when the number needs to be changed, i.e. serialization compatibility is no 
> longer possible.


> To that effect, by not using writeObject()/readObject() it will indeed be 
> slightly more tricky to maintain the serialization compatibility. With those 
> methods, it shouldn't be too hard to maintain compatibitity almost forever.



View raw message