United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6423003 JSR 199: confusing help message with compiler API
JDK-6423003 : JSR 199: confusing help message with compiler API

Details
Type:
Bug
Submit Date:
2006-05-08
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
Confusing help message with compiler API.

<src>
import java.util.Arrays;
import javax.tools.*;

public class T6423003 {
    public static void main(String... arg) throws Throwable {
        JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
        javac.getTask(null, null, null, Arrays.asList("-Xlint:all"), null, null).call();
    }
}
</src>
output of the message:
<output>
bash-3.00$ java T6423003
javacTask: no source files
^^^^^^^^^
Usage: javacTask <options> <source files>
use -help for a list of possible options
</output>

There is some inconsistency between running through command line and running through compiler API  also javacTask will be confusing to the user since its more of internal name.

                                    

Comments
EVALUATION

We should avoid using the word javacTask and we should probably
throw an IllegalStateException.
                                     
2006-09-30



Hardware and Software, Engineered to Work Together