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

stddoclet: When description is inherited, 1st sentence should go in member summa

XMLWordPrintable

      javadoc from JDK1.2b4j doesn't display a summary sentence for methods which
      inherit their javadoc comments. The inherited comments do appear in the
      Method Detail section with "Desription copied from interface", but no
      description appears in the Method Summary section.

      Doug Kramer wrote:

      > Thank you for catching that.
      >
      > Would you please point me to an example?

      Here's a quick sample which demonstrates the missing copied description in
      Method Summary. It's also interesting to note that since I didn't provide a
      public constructor for the class, I got the default constructor SampleClass()
      which has no comment. Might be useful to put something like "Implicit default
      constructor".

      /**
       * Sample class
       */
      public class SampleClass implements SampleClass.SampleInterface
      {
          /**
           * Sample interface
           */
          public interface SampleInterface
          {
              /** Sample method from Sample Interface */
              public void sampleMethod();
          }
          // inherit comment from interface
          public void sampleMethod(){}
      }

      The output looks like this:

      -------------------------------------
      | Method Summary |
      -------------------------------------
      | void | sampleMethod() |
      | | | <-- NOTE FIRST SENTENCE IS MISSING
      -------------------------------------

      -------------------------------------
      | Method Detail |
      -------------------------------------
      sampleMethod

      public void sampleMethod()
         Description from interface:
         Sample method from Sample Interface <-- NOTE FIRST SENTENCE IS HERE
         Specified by:
             <a>sampleMethod</a> in inteface <a>SampleClass.SampleInterface</a>

            adambalksunw Atul Dambalkar (Inactive)
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: