-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
8
In the Oracle/OpenJDK implementation we have the following class hierarchy:
public class DoubleAccumulator extends package-private class Striped64
package-private class Striped64 extends public abstract class Number
public abstract class Number implements Serializable.
In the documentation
API javadoc: public class DoubleAccumulator extends Number implements Serializable
Serialized Form: Class DoubleAccumulator extends Striped64 implements Serializable
Thus, there are 2 different parents for DoubleAccumulator and 3 other classes. This seems strange:
1. The only mention of class Striped64 is in Serialized Form. So licenceees' DoubleAccumulator must extend Striped64. But Striped64 is not a part of the public specification!
2. On the other hand, according to the specifications of the API, licencees implementations must inherit it from Number.
Where is the truth?
JCK engineers think that this is not very good idea to make Striped64 package-private. Making it protected may solve the problem.
public class DoubleAccumulator extends package-private class Striped64
package-private class Striped64 extends public abstract class Number
public abstract class Number implements Serializable.
In the documentation
API javadoc: public class DoubleAccumulator extends Number implements Serializable
Serialized Form: Class DoubleAccumulator extends Striped64 implements Serializable
Thus, there are 2 different parents for DoubleAccumulator and 3 other classes. This seems strange:
1. The only mention of class Striped64 is in Serialized Form. So licenceees' DoubleAccumulator must extend Striped64. But Striped64 is not a part of the public specification!
2. On the other hand, according to the specifications of the API, licencees implementations must inherit it from Number.
Where is the truth?
JCK engineers think that this is not very good idea to make Striped64 package-private. Making it protected may solve the problem.
- relates to
-
JDK-8026983 javadoc mentions non-serializable classes on the Serialized Form page
-
- Open
-
-
JDK-8026344 j.u.c.a *Adder and *Accumulator extend a package private class that is Serializable
-
- Closed
-