Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
-
b115
-
Verified
Description
This bug is for part 2 of JDK-8026220 whose description is below:
A serialized stream includes the ObjectStreamClass of the superclass if the superclass is Serializable. So I'm starting to conclude that we have two issues:
1. A javadoc bug. Taking StringBuilder as an example then its superclass is the package-private AbstractStringBuilder (not Serializable) and there is no reference to this in the serialized stream. So I think javadoc needs to filter this out, as it does in the class view.
2. A j.u.c. problem because *Adder and *Accumulator extend a package private class that is Serializable (because Striped64 extends Number). As a check, I've serialized a DoubleAccumulator instance and the bytes include a reference to Striped64.
A serialized stream includes the ObjectStreamClass of the superclass if the superclass is Serializable. So I'm starting to conclude that we have two issues:
1. A javadoc bug. Taking StringBuilder as an example then its superclass is the package-private AbstractStringBuilder (not Serializable) and there is no reference to this in the serialized stream. So I think javadoc needs to filter this out, as it does in the class view.
2. A j.u.c. problem because *Adder and *Accumulator extend a package private class that is Serializable (because Striped64 extends Number). As a check, I've serialized a DoubleAccumulator instance and the bytes include a reference to Striped64.
Attachments
Issue Links
- relates to
-
JDK-8026220 javadoc leaking package-private types into serialized-form.html
- Resolved
-
JDK-8292877 java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly
- Resolved