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

javadoc gets an error when processing missing interface method

XMLWordPrintable

    • 1.0beta
    • sparc
    • solaris_2.4
    • Not verified

      When you are running javadoc on a class which fails to provide
      an implementation for one of the methods that is specified by an
      interface which it claims to implement, then javadoc will get an
      exception. For example:

      ----begin testdoc.java----
      class testdoc implements java.awt.image.ImageObserver {
      }
      ----end testdoc.java----

      Note that the ImageObserver interface requires a function that
      takes some parameters. If you change ImageObserver above to
      "Runnable" there will be no error since the method required by
      Runnable takes no parameters.

      Run javadoc on the testdoc.java file and it should get the error:

      javadoc -d . -verbose testdoc.java
      [parsed testdoc.java in 130ms]
      generating documentation for class testdoc
      [loaded /export/home/benden0/java/build/classes/java/lang/Object.class in 86ms]
      [loaded /export/home/benden0/java/build/classes/java/awt/image/ImageObserver.class in 38ms]
      java.util.NoSuchElementException VectorEnumerator
      at java.lang.Throwable.<init>(Throwable.java:70)
      at java.lang.Exception.<init>(Exception.java)
      at java.lang.RuntimeException.<init>(RuntimeException.java)
      at java.util.NoSuchElementException.<init>(NoSuchElementException.java)
      at java.util.VectorEnumerator.nextElement(Vector.java)
      at java.tools.javadoc.DocumentationGenerator.genMethodDocumentation(DocumentationGenerator.java:495)
      at java.tools.javadoc.DocumentationGenerator.genClassDocumentation(DocumentationGenerator.java:990)
      at java.tools.javadoc.Main.main(Main.java:216)
      error: An exception has occurred in the compiler, please file a bug report (###@###.###).

            fyellinsunw Frank Yellin (Inactive)
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: