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 [EMAIL PROTECTED]



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to