Community
Participate
Working Groups
This is related to bug 138017, but I'd just like to see better handling of the case where an invalid option is passed to the java -warn: flag. Thus, instead of: [javac] invalid warning: +nls [javac] Compile failed; see the compiler error output for details. We could have: [javac] invalid warning: +nls. Ignoring warning & compiling anyway.
This is debatable. What about a compilation that takes 30 minutes? You didn't specify a valid option and the compilation continues anyway. At the end, you have to change it and do it again.
Closing as LATER. I will revisit the warning option on the command line for 3.3. I think we could improve it with a syntax like this: -warn:-serial,unusedLocal,+nls All options after the '-' would be disabled and all the options after the + would be enabled.
I would also favor being resilient to unsupported warning names (a la @SuppressWarnings) to ease adoption.
Reopen for 3.4?
Reopen for consideration in 3.4.
Created attachment 75145 [details] Proposed fix
Philippe, please review.
Looks good to me.
Move to 3.4M4. This will be released as soon as the 3.4M3 is declared.
Released for 3.4M4. In order to verify, invalid options need to be passed to the batch compiler.
Added regression test org.eclipse.jdt.core.tests.compiler.regression.BatchCompilerTest#test152
Verified for 3.4M4 using build I20071210-1800.