Bug 25735 - Non-NLS strings are not reported properly when the ending tag is missing
Summary: Non-NLS strings are not reported properly when the ending tag is missing
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-05 13:24 EST by Olivier Thomann CLA
Modified: 2017-09-08 11:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-11-05 13:24:47 EST
Compiling this code, report a non-nls string on the second one instead of the
first one.
public class A {
		String s = 
			"	public	int	foo() { \n" + //$NON-NLS-1
			"		return 2; \n";//$NON-NLS-1$
}

Note the missing '$' at the end of the first NLS tag.
Comment 1 Olivier Thomann CLA 2002-11-05 13:25:32 EST
The bug is due to an ArrayIndexOutOfBoundsException caused by a -1 for the
position of the ending tag.
Comment 2 Olivier Thomann CLA 2002-11-05 13:34:46 EST
Fixed and released in 2.1 stream.
Regression test (NegativeTest.test291) added.
Comment 3 Olivier Thomann CLA 2002-11-05 13:35:00 EST
Changed milestone.
Comment 4 David Audel CLA 2002-11-13 09:10:12 EST
Verified.