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