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

stddoclet: javadoc accepts @return tags for non-method comment paragraphs.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • tools
    • beta2
    • sparc
    • solaris_8
    • Verified

      Javadoc allows non-method comment paragraphs to contain @return tags. A warning message would be most helpful.

      Find the testcase below and the behaviour of the tool attached.
      ---------------------------------------------------------------
      /*
       * TagTest4.java
       * Written to test if non-method comment paragraphs are allowed to have '@return
      ' tag.
       * @return something
       */

      public class TagTest4
      {
              /*
               * @return somethingField
               */
              int fValueOne;


      }

      Please find the behaviour of the standard doclet below.
      -------------------------------------------------------
      jtools-sqe:/home/vr128054/jd-tests/newjavadoc/tests/api 80 % java -Dfile.encoding=EUC-JP -Xbootclasspath/p:/home/vr128054/gj/gjclasses3 -classpath /home/vr128054/gj/gjclasses3 com.sun.tools.javadoc.Main TagTest4.java
      Loading source file TagTest4.java...
      Constructing Javadoc information...
      Building tree for all the packages and classes...
      Building index for all the packages and classes...
      Generating overview-tree.html...
      Generating index-all.html...
      Generating deprecated-list.html...
      Building index for all classes...
      Generating allclasses-frame.html...
      Generating index.html...
      Generating packages.html...
      Generating TagTest4.html...
      Generating package-list...
      Generating help-doc.html...
      Generating stylesheet.css...

            jhosunw Jamie Ho (Inactive)
            rvijayansunw Ra Vijayan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: