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

stricter command line parsing required.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • tools
    • None


      consider

      javadoc test.java test.java


      Find the output below:
      ----------------------

      jtools-sqe:/home/vr128054/vertest/work 448 % javadoc test.java test.java
      Loading source file test.java...
      Loading source file test.java...
      Constructing Javadoc information...
      test.java:1: duplicate class: test
      public class test
             ^
      test.java:22: duplicate class: second
      class second extends test
      ^
      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
      2 warnings



      While it is valid to report an error, attempting to proceed requires a graceful exit. The command-line parser could perhaps report a warning, then delete the duplicate file name occurrance and give it to the tool for normal processing.

            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: