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

javadoc crashes with fatal exception, trying to warn a fatal error and proceed.

XMLWordPrintable

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

      When t.java and t1.java have 'public class t' (a negative scenario),

      I tried to

      javadoc t.java t1.java

      I get an exception and crash.
      ------------------------------

      jtools-sqe:/home/vr128054/vertest/work 400 % javadoc t.java t1.java
      Loading source file t.java...
      Loading source file t1.java...
      Constructing Javadoc information...
      t1.java:1: class t is public, should be declared in a file named t.java
      public class t
             ^
      java.lang.NullPointerException
              at com.sun.tools.javadoc.DocEnv.shouldDocument(DocEnv.java:191)
              at com.sun.tools.javadoc.RootDocImpl.setClasses(RootDocImpl.java:81)
              at com.sun.tools.javadoc.RootDocImpl.<init>(RootDocImpl.java:67)
              at com.sun.tools.javadoc.JavadocTool.getRootDocImpl(JavadocTool.java:205)
              at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:284)
              at com.sun.tools.javadoc.Start.begin(Start.java:114)
              at com.sun.tools.javadoc.Main.execute(Main.java:44)
              at com.sun.tools.javadoc.Main.main(Main.java:34)
      javadoc: fatal exception
      1 error
      1 warning


      While older javadoc reports an error and gracefully exits, the new javadoc produces a fatal error and crashes.
      ###@###.### 2001-08-27

      This problem is reproducible when duplicate classes are found in the same file too.
      ###@###.### 2001-08-27

            gafter Neal Gafter (Inactive)
            rvijayansunw Ra Vijayan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: