Details
-
Bug
-
Resolution: Fixed
-
P4
-
8
-
b78
-
Verified
Description
The constructor:
public JavapTask(Writer out,
JavaFileManager fileManager,
DiagnosticListener<? super JavaFileObject> diagnosticListener,
Iterable<String> options,
Iterable<String> classes)
breaks with null pointer exception if parameter options is null. It does not make sense for the user of this method to create an empty List instance for it to work. Which is not a valid workaround, because the method will print the usage (as in the case of a wrong option) and later will process the classes parameter and produce the output if the last parameter is correct. So it is possible to end up having more output than expected. This behavior can make some tests, for example, to find false positives.
public JavapTask(Writer out,
JavaFileManager fileManager,
DiagnosticListener<? super JavaFileObject> diagnosticListener,
Iterable<String> options,
Iterable<String> classes)
breaks with null pointer exception if parameter options is null. It does not make sense for the user of this method to create an empty List instance for it to work. Which is not a valid workaround, because the method will print the usage (as in the case of a wrong option) and later will process the classes parameter and produce the output if the last parameter is correct. So it is possible to end up having more output than expected. This behavior can make some tests, for example, to find false positives.