Bug 29365 - Syntax error inside method body is fooling NLS string detection
Summary: Syntax error inside method body is fooling NLS string detection
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 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-13 05:13 EST by Philipe Mulet CLA
Modified: 2003-02-10 09:46 EST (History)
0 users

See Also:


Attachments
BlockScope.java (54.78 KB, text/plain)
2003-01-13 05:15 EST, Philipe Mulet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2003-01-13 05:13:58 EST
Build 2.1-M4

In following (incorrect) source for BlockScope, some Strings are reported as 
non-NLS'ed, though they are properly tagged as such.
Comment 1 Philipe Mulet CLA 2003-01-13 05:15:21 EST
Created attachment 2953 [details]
BlockScope.java
Comment 2 Olivier Thomann CLA 2003-01-13 09:23:54 EST
The bug is due to the fact that the scanner.currentLine is not reset before
resuming after recovery. Therefore the current NLS line accumulates more than
one string literals (all the same and reports an error for them).
Resetting the scanner's current line in the resetStack() method fixes the problem.
Comment 3 Olivier Thomann CLA 2003-01-13 10:31:56 EST
Fixed and released in 2.1 stream.
Regression test added.
Comment 4 David Audel CLA 2003-02-10 09:46:28 EST
Verified.