classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new jalopy available


From: Eric Blake
Subject: Re: new jalopy available
Date: Sat, 22 Nov 2003 07:57:55 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

Michael Koch wrote:

Serializable classes have to have their fields in the same order as in
in SUNs classes because of serialization issues.

I thought we already had the style rule that all serialized classes provide an explicit serialVersionUID - because we cannot depend on the compiler to generate the same serial version as Sun. Case in point: when a class literal appears in the class, Sun emits a one-argument class$ method, but jikes emits a two-argument version; this affects the serial version. Also, as long as the serial version is correct, deserialization is name-based (not offset-based). Therefore, field ordering does not matter, so long as we provide the explicit UID.

--
Someday, I might put a cute statement here.

Eric Blake             address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]