Mon, 07 Mar 2011 13:45:06 -0800
6980021: javac should document @file command line option
Reviewed-by: mcimadamore
1.1 --- a/src/share/classes/com/sun/tools/javac/main/OptionName.java Mon Mar 07 11:37:54 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/OptionName.java Mon Mar 07 13:45:06 2011 -0800 1.3 @@ -88,6 +88,7 @@ 1.4 O("-O"), 1.5 XJCOV("-Xjcov"), 1.6 XD("-XD"), 1.7 + AT("@"), 1.8 SOURCEFILE("sourcefile"); 1.9 1.10 public final String optionName;
2.1 --- a/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java Mon Mar 07 11:37:54 2011 -0800 2.2 +++ b/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java Mon Mar 07 13:45:06 2011 -0800 2.3 @@ -168,6 +168,7 @@ 2.4 O, 2.5 XJCOV, 2.6 XD, 2.7 + AT, 2.8 SOURCEFILE); 2.9 2.10 static Set<OptionName> javacFileManagerOptions = EnumSet.of( 2.11 @@ -565,12 +566,27 @@ 2.12 } 2.13 }, 2.14 2.15 + // This option exists only for the purpose of documenting itself. 2.16 + // It's actually implemented by the CommandLine class. 2.17 + new Option(AT, "opt.arg.file", "opt.AT") { 2.18 + @Override 2.19 + String helpSynopsis() { 2.20 + hasSuffix = true; 2.21 + return super.helpSynopsis(); 2.22 + } 2.23 + @Override 2.24 + public boolean process(Options options, String option) { 2.25 + throw new AssertionError 2.26 + ("the @ flag should be caught by CommandLine."); 2.27 + } 2.28 + }, 2.29 + 2.30 /* 2.31 * TODO: With apt, the matches method accepts anything if 2.32 * -XclassAsDecls is used; code elsewhere does the lookup to 2.33 * see if the class name is both legal and found. 2.34 * 2.35 - * In apt, the process method adds the candiate class file 2.36 + * In apt, the process method adds the candidate class file 2.37 * name to a separate list. 2.38 */ 2.39 new HiddenOption(SOURCEFILE) {
3.1 --- a/src/share/classes/com/sun/tools/javac/resources/javac.properties Mon Mar 07 11:37:54 2011 -0800 3.2 +++ b/src/share/classes/com/sun/tools/javac/resources/javac.properties Mon Mar 07 13:45:06 2011 -0800 3.3 @@ -146,6 +146,8 @@ 3.4 Print information about which annotations a processor is asked to process 3.5 javac.opt.prefer=\ 3.6 Specify which file to read when both a source file and class file are found for an implicitly compiled class 3.7 +javac.opt.AT=\ 3.8 + Read options and filenames from file 3.9 3.10 ## errors 3.11
4.1 --- a/test/tools/javac/diags/CheckResourceKeys.java Mon Mar 07 11:37:54 2011 -0800 4.2 +++ b/test/tools/javac/diags/CheckResourceKeys.java Mon Mar 07 13:45:06 2011 -0800 4.3 @@ -23,7 +23,7 @@ 4.4 4.5 /* 4.6 * @test 4.7 - * @bug 6964768 6964461 6964469 6964487 6964460 6964481 4.8 + * @bug 6964768 6964461 6964469 6964487 6964460 6964481 6980021 4.9 * @summary need test program to validate javac resource bundles 4.10 */ 4.11