Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8026220

javadoc leaking package-private types into serialized-form.html

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 8
    • tools

      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.

            jjg Jonathan Gibbons
            alfedoro Alexey Fedorov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: