-
Bug
-
Resolution: Fixed
-
P2
-
1.1.6, 1.2.0
-
1.1.6
-
generic
-
solaris_2.5
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2017637 | 1.2.0 | Joe Fialli | P2 | Resolved | Fixed | 1.2beta3 |
Backwards compatibility of a serialized stream does not work for
following class evolution scenario.
A Serializable Class A is evolved in the following manner.
Add a new field, fieldA, to Class A.
The type of the field is also new and it is exernalizable.
Produce a serialized stream containing Class A.
Attempt to read the serialized stream using the original
Class A definition that did not include field A. Additionally,
the type of fieldA does not exist in this class path.
While reading an instance of A, the following stack trace is produced
java.io.StreamCorruptedException: Type code out of range, is 66
at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1168)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
following class evolution scenario.
A Serializable Class A is evolved in the following manner.
Add a new field, fieldA, to Class A.
The type of the field is also new and it is exernalizable.
Produce a serialized stream containing Class A.
Attempt to read the serialized stream using the original
Class A definition that did not include field A. Additionally,
the type of fieldA does not exist in this class path.
While reading an instance of A, the following stack trace is produced
java.io.StreamCorruptedException: Type code out of range, is 66
at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1168)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
- backported by
-
JDK-2017637 Fix Stream Protocol for Externalizable: Enable skipping externalizable data
-
- Resolved
-
- relates to
-
JDK-4088176 backward compat. fails reading an evolved class with new field,nonexistant class
-
- Closed
-