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

javadoc doesn't allow exception comments on a new line

XMLWordPrintable

    • sparc
    • solaris_2.5

          If I put the comment for an @exception on a new line, javadoc complains
      that there is no documentation.

          For example:

      analemma ... cat java/play/Frisbee.java
      package play;

      public class Frisbee extends java.lang.Exception {
          /** Thrown by children (of all ages). */
      }
      analemma ... cat java/play/Child.java
      package play;

      public class Child {
          /**
           * This is what children do.
           * @param outside are we playing inside or outside?
           * @return the degree of fun achieved.
           * @exception play.Frisbee
           * better do this outside!
           */
          public int outside(boolean outside) throws play.Frisbee {
      throw new play.Frisbee(); // a new one each time!
          }
      }
      analemma ... javadoc -d . -classpath java:/home/analemma/java/JDK-1.0/java/lib/classes.zip java/play/Child.java
      Generating packages.html
      generating documentation for class play.Child
      Method int outside(boolean) declares that it throws class play.Frisbee but there is no documentation
      Couldn't find play.Frisbee

      Generating index
      Sorting 2 items . . . done
      Generating tree

      (Actually, I don't know what this is going to look like in the bugtool.
      The point is I've used tabs to line up the name of the parameter and the
      name of the exception, and the comments for each, and because the exception
      name is long, I've put the comment for the exception on the next line.)

          I suspect that the tokenizer for javadoc is including the newline that
      terminates the @exception line in the token for the exception name, because
      if I put a trailing space on that line it all works. I think that explains
      the message `Couldn't find play.Frisbee\\n' (with the extra \\n), too.

          I've also noticed that javadoc doesn't like tabs between the leading
      `*' and the `@whatever'. That would be an RFE, though.

      ... peter 4/26/96

            mr Mark Reinhold
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: