I am wondering whether it is safe to mix jdk 1.5 and 1.6 (Java 6) object serialization (biderctional communication). I searched for an explicit statement from sun concerning this question but did not succeed. So, besides the technical feasability I am searching for an "official" statement concerning the problem.
解决方案
The serialization mechanism itself has not changed. For individual classes it will depend on the specific class. If a class has a serialVersionUID field, this is supposed to indicate serialization compatiblity.
Something like:
private static final long serialVersionUID = 8683452581122892189L;
If it is unchanged, the serialized versions are compatible. For JDK classes this is guaranteed, but of course it is always possible to forget to update the serialVersionUID after making a breaking change.
When JDK classes are not guaranteed to be compatible, this is usually mentioned in the Javadoc.
Warning: Serialized objects of this class will not be compatible with future Swing releases