Eric Blake wrote:

>Therefore, the safest course of action is to explicitly have a
>serialVersionUID for all Serializeable classes, rather than relying on
>the implicit UID generated by the undocumented hash behavior.  
>

After reading your explanation, I agree.

>Note that the serialVersionUID field should be a private variable (Sun's serialver
>neglects this fact, making it seem like package-private is acceptable),
>so that it is not inherited by other subclasses in the same package.
>

Actually this shouldn't matter, since the serialization code looks up 
serialVersionUID using getDeclaredField(), which will not return fields 
declared in superclasses.

regards

Bryce.



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

Reply via email to