Community
Participate
Working Groups
The compiler does not warn about non-externalized strings if the code is not compiled e.g. for the following code with DEBUG= false; if (DEBUG) System.out.println("mmm"); On the other hand the NLS tool reports that string as not being externalized.
moving to JDT Core for comment.
Cannot reproduce. If the compiler settings are changed to report a warning when a string is not externalized, it works fine. By default the compiler ignores these errors. Are you sure that your compiler settings are right?
It reports the NLS errors correctly in all cases except where the code will not be compiled because it is inside an if (false) block e.g. boolean static final DEBUG= false; ... if (DEBUG) System.out.println("this is a string");
Created attachment 1219 [details] Result I got in F2
Here is a picture of what I got in F2. My test case is: class Test2 { public static final boolean DEBUG = false; public static void main(String[] arguments) { if (DEBUG) { System.out.println("toto"); } } } And "toto" is reported as a non externalized string. So I really cannot reproduce in F2.
Forgot to add the build id. As the date may indicate this problem is reported against a pre F2 build. It seems that something in that area has been fixed. It works now for me on F2.
No we did not change this area in the code.