Community
Participate
Working Groups
Discovered on 3.1, still present as of 3.2M4. Put the code below into the appropriate files, then compile Foo.java using the batch compiler. Although the compiler must compile Bar in order to compile Foo, no errors are reported against Bar.java. Only the following: 1. ERROR in Foo.java (at line 5) return new Bar(5); ^^^^^^^^^^ The constructor Bar(int) is undefined If you compile Bar.java explicitly, you see that the real problem (#3 below) is misuse of the reserved word 'class': 1. ERROR in Bar.java (at line 2) { ^ Syntax error, insert "}" to complete ClassBody ---------- 2. ERROR in Bar.java (at line 3) Bar(int class) ^^^^^ Syntax error on token "class", invalid VariableDeclaratorId ---------- 3. ERROR in Bar.java (at line 3) Bar(int class) { } ^^^^^^^^^^^^^^^^ Syntax error on tokens, delete these tokens ---------- 4. ERROR in Bar.java (at line 6) } ^ Syntax error on token "}", delete this token // Foo.java public class Foo { static Object x() { return new Bar(5); } } // Bar.java public class Bar { Bar(int class) { } }
Unless using option "-proceedOnError" on command line, the batch compiler is indeed not surfacing detected errors in files which are queued for compile, as Bar in this scenario.
Added support to batch compiler. Added BatchCompilerTest#test052. Fixed
Verified for 3.2 M6 using build I20060328-0010