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

First sentence algorithm incorrectly applied twice with {@inheritDoc}

XMLWordPrintable

    • b61
    • generic
    • generic

      The {@inheritDoc} algorithm applies "first sentence" recognition
      both to the text of this main description, and the text of any
      main description inherited via {@inheritDoc}, yielding
      a final "first sentence" that is actually the concatenation of the
      inherited first sentence plus the first sentence added in the
      inheriting doc comment.

      Self-explanatory shell transcript follows:
      (See the summary for D2.html below)

      $ cat D1.java; cat D2.java; javadoc D?.java >/dev/null && grep 'First sentence' D?.html
      public class D1 {
          /**
           * First sentence. Second sentence.
           */
          public void m() {}
      }
      public class D2 extends D1 {
          /**
           * {@inheritDoc} Third sentence. Fourth sentence.
           */
          public void m() {}
      }
      D1.html:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;First sentence.</TD>
      D1.html:<DD>First sentence. Second sentence.
      D2.html:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;First sentence. Third sentence.</TD>
      D2.html:<DD>First sentence. Second sentence. Third sentence. Fourth sentence.
      ###@###.### 2005-04-11 21:59:24 GMT

            jhosunw Jamie Ho (Inactive)
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: