> So would this actually allow people upgrading from 1.2 to 1.2.1 not need to
> wipe their data? If so, that's fantastic. If not, does this mean we won't
> risk this problem in the future?
These two lines manually set the serialization IDs to the values the were
auto-magically assigned for the respective classes (MailImpl & MailAddress) when 1.2
was released. So, yes, this should allow folk to upgrade from 1.2 to 1.2.1 without
having to wipe their data, and this allows us to change things in the future without
any problems *as long as* we don't change the form of the actual serialized data. In
the case of MailAddress that means being careful about not changing non-transient
proporties. For MailImpl (which overrides automatic serialization) it means not
changing the readObject and writeObject methods, or the object types referenced within
them.
For more info read "Java I/O" - none of this comes from me! :-)
Stuart.
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Stuart Roebuck" <[EMAIL PROTECTED]>
> To: "Java Apache Mail Server" <[EMAIL PROTECTED]>
> Sent: Tuesday, November 28, 2000 1:34 PM
> Subject: Re: Bug fix release vs release with new avalon
>
>
> Following from this previous post (below). I tried making the change I
> suggested and it didn't help at all (whoops - didn't spot the overriding
> readObject() and writeObject() methods!). Having found no substantive
> differences between the old and new MailImpl and MailAddress classes, in
> terms of serialization, I eventually resorted to the more risky approach and
> added in the following lines at the beginning of the respective classes:
>
> MailImpl.java:
>
> static final long serialVersionUID=-4289663364703986260L;
>
> MailAddress.java:
>
> static final long serialVersionUID=2779163542539434916L;
>
> This may not be elegant, but it works!
>
> Stuart.
>
** We are currently experiencing prolonged difficulties with our email **
** provider DIGIWEB and INTERLIANT. To guarantee that your response **
** is received, please replace "adolos.com" with "adolos.co.uk" **
** in your response. **
-------------------------------------------------------------------------
Stuart Roebuck [EMAIL PROTECTED]
Lead Developer Mac OS X, Java, XML, etc.
ADOLOS http://www.adolos.com/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives: <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]