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

Cannot suppress @see reference in overriding method

XMLWordPrintable

      If a method overrides a method whose documentation comment includes an @see tag,
      then there appears to be no way for the overriding method to suppress the 'See
      Also' reference in its documentation. This behavior seems to be a result of the
      new features for inheriting documentation introduced in the 1.4 release.

      Here's a simple test case:

      public class InheritDocProblem {
          /** @see #goo */
          public void foo() { }
          /** @see #foo */
          public void goo() { }
          public static class Inner extends InheritDocProblem {
      /** Don't want See Also here. */
      public void foo() { }
      /** Or here!
      * @see
      */
      public void goo() { }
          }
      }

      The resulting javadoc looks like:

      foo

      public void foo()

           Don't want See Also here.

           Overrides:
                foo in class InheritDocProblem
           See Also:
                InheritDocProblem.goo()

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

      goo

      public void goo()

           Or here!

           Overrides:
                goo in class InheritDocProblem
           See Also:

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

            bpatel Bhavesh Patel (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: