Details
-
Bug
-
Resolution: Fixed
-
P2
-
8
-
b117
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8028898 | port-stage-ppc-aix | Roger Riggs | P2 | Resolved | Fixed | master |
Description
In the description of the serialized form for the j.l.String class we have:
"Class String is special cased within the Serialization Stream Protocol. A String instance is written initially into an ObjectOutputStream in the following format:
TC_STRING (utf String)
The String is written by method DataOutput.writeUTF. A new handle is generated to refer to all future references to the string instance within the stream."
But in fact if utf length of the string is bigger than 0xFFFF, then a String instance is written in the following format:
TC_LONGSTRING (utf String).
"Class String is special cased within the Serialization Stream Protocol. A String instance is written initially into an ObjectOutputStream in the following format:
TC_STRING (utf String)
The String is written by method DataOutput.writeUTF. A new handle is generated to refer to all future references to the string instance within the stream."
But in fact if utf length of the string is bigger than 0xFFFF, then a String instance is written in the following format:
TC_LONGSTRING (utf String).
Attachments
Issue Links
- backported by
-
JDK-8028898 Serialized Form description of j.l.String is not consistent with the implementation
- Resolved
- relates to
-
JDK-4217676 should be able to serialize strings > 64K
- Resolved