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

"Specified by:" and "Overrides:" should exist & point to ext. referenced classes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 5.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      [This bug is re-written from bug 4854934]

      It appears that when method A.m overrides method in external referenced class B,
      the "Overrides:" section is not generated (but should be). That is, if B is not
      passed in on the command line, javadoc does not create the "Overrides:" section
      for method m. If B is passed in, then it does create the "Overrides:" section.

      Example: Given this source file with method read() that overrides
      "public int read()" in FilterReader:

      ---------------- XReader.java ---------------------
      public class XReader extends java.io.FilterReader {
        /**
         * This is a doc comment
         */
         public int read() {
            return 'W';
         }
      }
      ---------------------------------------------------

      Generate the HTML documentation using Javadoc 1.4.2-beta:

      javadoc -d html XReader.java

      The generated HTML documentation for XReader.read()
      is missing any "Overrides:" labels. It actually looks
      like this:

      -----------------------------
      read

      public int read()

         This is a doc comment
      ------------------------------

      It should instead look like this, with override labels:

      -----------------------------
      read

      public int read()

         This is a doc comment

      Overrides:
         read in class FilterReader
         ~~~~ ~~~~~~~~~~~~
      ------------------------------

      Adding the -link or -linkoffline option makes no difference --
      the labels and links still do not appear when trying this:

      javadoc -d html -linkoffline "http://java.sun.com/j2se/1.4/docs/api" . XReader.java

      In this case, "read" should be a link to java/io/FilterReader.html#read()
      and "FilterReader" should be a link to java/io/FilterReader.html,
      identical to this J2SE class that extends FilterReader:

      http://java.sun.com/j2se/1.4.1/docs/api/java/io/PushbackReader.html#read()

      The presence of these labels and links should be independent
      of inheriting doc comments.

      FWIW, I tested for the presenece of "Specified by:" when implementing
      an external referenced class (to see if it's a problem), and it works
      just fine, producing "Specified by:" labels and links. Here's that source
      file:

      ----------------- XComparable.java -----------------------
      public class XComparable implements java.lang.Comparable {
         public int compareTo(Object o) {
            return 'W';
         }
      }
      --------------------------------------------------------

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jhosunw Jamie Ho (Inactive)
              Reporter:
              dkramersunw Douglas Kramer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: