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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • 8
    • tools
    • None
    • b112
    • Verified

    Description

      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)
      ...

      Attachments

        Activity

          People

            ksrini Kumar Srinivasan
            ahgross Andrew Gross
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: