Stefano Bagnara schrieb:
Norman Maurer wrote:
Im almost sure we are in big trouble now.. Cause if i change the
SerialVersionUID to the same as in 2.2.0 we will break the
userrepositories of the users which start using james with 2.3.0x .
If i use the SerialVersionUID of 2.3.0x we have the same problem with
users of 2.2.0..
I checked the history for DefaultJamesUser and it doesn't seem to have
changed interface/signatures since 2.2.0 (apart the last initialize
removal). So 2.3.0RCs and 2.2.0 should have the same SerialVersionUIDs
and only trunk after 16 Sep is different: am I wrong?
If so then we should simply add the serialversionUID (the one from
2.2.0) to both 2.3.0 and 2.2.0.
Otherwise, we have to understand why it is not the same: the changelog
does not show changes. Maybe something related to an abstrac class or
an implemented interface changed?
Stefano
Thx for checkin this. But i think its not so easy.. From javadocs:
If a serializable class does not explicitly declare a
*serialVersionUID*, then the serialization runtime will calculate a
default *serialVersionUID* value for that class based on various aspects
of the class, as described in the *Java*(TM) Object Serialization
Specification. However, it is /strongly recommended/ that all
serializable classes explicitly declare *serialVersionUID* values, since
the default *serialVersionUID* computation is highly sensitive to class
details that may vary depending on compiler implementations, and can
thus result in unexpected |InvalidClassException|s during
deserialization. Therefore, to guarantee a consistent *serialVersionUID*
value across different *java* compiler implementations, a serializable
class must declare an explicit *serialVersionUID* value. It is also
strongly advised that explicit *serialVersionUID* declarations use the
|private| modifier where possible, since such declarations apply only to
the immediately declaring class--*serialVersionUID* fields are not
useful as inherited members.
So if i understand write the serialVersionUID is generated from the
class content and the java compiler. So it will be diffrent.
bye
Norman
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]