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

stddoclet: javadoc incorrectly lists hidden fields

XMLWordPrintable

    • mantis
    • generic
    • generic



      Name: ssR10172 Date: 08/15/2001



      javadoc tool incorrectly lists fields which are hidden by private
      field declaration. See JLS $8.2.1.3 for more details.

      For example JDK 1.3.1 JavaDoc documentation lists following fields in
      "Fields inherited from class XXX " table:

      In class javax.swing.JTree$AccessibleJTree$AccessibleJTreeNode:
      protected javax.accessibility.Accessible
      javax.swing.JTree$AccessibleJTree$AccessibleJTreeNode.accessibleParent

      In class javax.swing.plaf.metal.MetalInternalFrameUI:
      protected javax.swing.plaf.basic.BasicInternalFrameTitlePane
      javax.swing.plaf.metal.MetalInternalFrameUI.titlePane

      In class javax.swing.plaf.metal.MetalScrollBarUI:
      protected java.awt.Color javax.swing.plaf.metal.MetalScrollBarUI.thumbColor
      protected java.awt.Color
      javax.swing.plaf.metal.MetalScrollBarUI.thumbHighlightColor

      In class javax.naming.directory.BasicAttribute:
      public static final long javax.naming.directory.BasicAttribute.serialVersionUID

      But in all this classes we can find these variables declared as private:
      In src/javax/swing/JTree.java:
      private Accessible accessibleParent = null;
      In javax/swing/plaf/metal/MetalInternalFrameUI.java:
      private MetalInternalFrameTitlePane titlePane;
      In javax/swing/plaf/metal/MetalScrollBarUI.java
      private static Color thumbColor;
      private static Color thumbHighlightColor;
      In javax/naming/directory/BasicAttribute.java
      private static final long serialVersionUID = 6743528196119291326L;

      If variable is declared as private it can not be listed as inherited,
      since it's hidden and can not be mentioned as a public API.

      Also the same problem with inherited inner classes:

      In classes:
      java.security.Provider
      java.util.HashMap
      java.util.Hashtable
      java.util.Properties
      java.util.TreeMap
      java.util.WeakHashMap
      javax.swing.UIDefaults
      there is a "Inner classes inherited from class XXX" table, which lists
      "Map.Entry" inner class which is inherited from java.util.Map
      But all this classes which implement java.util.Map also have their
      one private innerclass "Entry" class. So all these classes should not
      list "Map.Entry" as inherited inner class.

      -------------------------------------------------------

      ======================================================================

            jhosunw Jamie Ho (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: