Bug 120870 - Spurious NLS tag warnings on code with syntax errors
Summary: Spurious NLS tag warnings on code with syntax errors
Status: VERIFIED DUPLICATE of bug 42253
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-14 09:48 EST by Martin Aeschlimann CLA
Modified: 2006-02-15 12:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2005-12-14 09:48:33 EST
20051214-0010

1. enable to warn abou unecessary NLS tags
2. In the following code, all //$NON-NLS-1$ are marked with warnings, but as soon you fix the problem ('int modifiers= ;' to 'int modifiers= 1;') they go away again.

package p;
public class Bar {
	private String constructSimpleTypeStub() {
		int modifiers= ;
		String type= ""; //$NON-NLS-1$
		switch (modifiers) {
			case 1: 
				type= "class ";  //$NON-NLS-1$
				break;
			case 2: 
				type= "interface "; //$NON-NLS-1$
				break; 
			case 3: 
				type= "enum "; //$NON-NLS-1$
				break;
			case 4: 
				type= "@interface "; //$NON-NLS-1$
				break;
		}
		return buf.toString();
	}
}
Comment 1 Olivier Thomann CLA 2005-12-14 09:59:27 EST
I can disable to validation of nls tags in case of syntax errors.
Comment 2 Olivier Thomann CLA 2005-12-14 10:00:00 EST
But ideally we should filter out the nls tags related to the current methods and continue to report the other ones.
Comment 3 Jerome Lanneluc CLA 2005-12-14 10:28:13 EST
David, you might want to look at this case as part of the robust AST work.
Comment 4 David Audel CLA 2006-02-08 11:27:39 EST

*** This bug has been marked as a duplicate of 42253 ***
Comment 5 Frederic Fusier CLA 2006-02-15 12:01:08 EST
Verified for 3.2 M5 using build I20060215-0010.