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

Javadoc emits redundant warnings for @return on non-method components

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • tools
    • beta2
    • beta3
    • sparc
    • solaris_9
    • Verified

      This is in reference to fix for bug ID:4437764.

      For the following program,
      ---------------------------------------

      jtools-sqe:/home/vr128054/vertest/newbug 391 % more test.java
      /**
       * @return toCatchBug
       */
      public class test
      {
      }

      for the following merlin build,

      jtools-sqe:/home/vr128054/vertest/newbug 392 % javadoc -J-version
      java version "1.4.0-beta_refresh"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta_refresh-b73)
      Java HotSpot(TM) Client VM (build 1.4.0-beta_refresh-b73, mixed mode)

      the following log is dumped when javadoc is run.

      jtools-sqe:/home/vr128054/vertest/newbug 394 % javadoc test.java
      Loading source file test.java...
      Constructing Javadoc information...

      Standard Doclet version 1.4 beta (12 July 01)

      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 allclasses-noframe.html...
      Generating index.html...
      Generating packages.html...
      Generating package-summary.html...
      Generating package-tree.html...
      Generating package-frame.html...
      Generating test.html...
      test.java:4: warning - test: "@return toCatchBug" used with test, but should only be used with a method.
      Generating test.html...
      test.java:4: warning - test: "@return toCatchBug" used with test, but should only be used with a method.
      Generating package-list...
      Generating help-doc.html...
      Generating stylesheet.css...
      2 warnings


      Please investigate this, as there need not be 2 warnings for the same issue.
      And also on a related note, the @return on a field, for example, doesnt emit a warning.

      And Another issue regarding the warning message, could you please change the string to "<return> used with Class <name>" ? It now says "<return> used with <name>". the word, "class" will add more clarity.

            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: