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

stddoclet: Incorrectly documents inherited members from package-private class

XMLWordPrintable

    • b30
    • generic, x86
    • generic, other, windows_nt



      Name: nt126004 Date: 11/18/2002


      FULL PRODUCT VERSION :
      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Windows NT Version 4.0


      A DESCRIPTION OF THE PROBLEM :
      When a public class extends a package-private one,
      "javadoc -private" will include the methods and fields of the base
      class into the derived class, instead of merely referencing
      to them as inherited.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run javadoc -private on the example classes below
      (Foo.java, Bar.java).
      Look at Bar.html.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected result: In Bar class, the method doit() should be listed
      under "Methods inherited from class Foo" only.
      Actual result: Method doit() is listed under "Method
      Summary" and under "Method Detail". Similar for field x:

      Class Bar
        Field Detail
          protected int x
        Method Detail
          void another()
          public void doit()

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      /* non-public */ class Foo
      {
      protected int x;

      public void doit()
      {
      ++x;
      }
      }

      public class Bar extends Foo
      {
      void another()
      {
      }
      }

      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      Make the base class public.
      (Review ID: 167050)
      ======================================================================

            jhosunw Jamie Ho (Inactive)
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: