Bug 114077 - No NLS Warning if unnecessary nls tag before declaration
Summary: No NLS Warning if unnecessary nls tag before declaration
Status: VERIFIED FIXED
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 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-28 05:29 EDT by Benno Baumgartner CLA
Modified: 2005-10-31 05:57 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 Benno Baumgartner CLA 2005-10-28 05:29:06 EDT
Version: 3.1.0
Build id: I20051025-0800

Having Non externalized strings set to warning and having the code:

public void foo() {
	String s1= null; //$NON-NLS-1$
	String s2= "";
}

Then no warning is shown for s2. Also having:

public class E1 {
	private String s1= null; //$NON-NLS-1$
	
	public void foo() {
		String s2= "";
	}
}

No warning is shown for s2. It seams as if the compiler thinks that the non nls
tag for s1 belongs to s2.
Comment 1 Olivier Thomann CLA 2005-10-28 12:31:15 EDT
Fixed and released in HEAD.
Regression tests added in
org.eclipse.jdt.core.tests.compiler.regression.ExternalizeStringLiteralsTest.test015/016.
Comment 2 Frederic Fusier CLA 2005-10-31 05:57:12 EST
Verified for 3.2 M3 using build I20051031-0010