c.s.t.javac.api.JavacTool.getTask() - more informative exception

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • None
    • b112
    • Verified

      When a source file's name accidentally has whitespace on the end, the exception from getTask() is not clear as to where the issue lies. Adding the data used to make the decision (in this case the filename suffix) to the exception would make this more obvious.

      Exception in thread "main" java.lang.IllegalArgumentException: All compilation units must be of SOURCE kind
              at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:136)
              at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:107)
      ...

            Assignee:
            Kumar Srinivasan
            Reporter:
            Andrew Gross
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: