Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321352 - [compiler][reconciler] reporting of non-externalized string constants in role files
Summary: [compiler][reconciler] reporting of non-externalized string constants in role...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 10:47 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 07:36 EDT (History)
0 users

See Also:


Attachments
test and fix (5.28 KB, patch)
2010-07-30 11:06 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-07-30 10:47:04 EDT
If a role file contains non-externalized string constants and if these
should be reported as warnings or errors, the following issues are observed:
- the $NON-NLS-<n>$ doesn't silence a warning
- compiler and reconciler behave differently
Comment 1 Stephan Herrmann CLA 2010-07-30 11:06:04 EDT
Created attachment 175584 [details]
test and fix

Tests are OTReconcilerTests.testNLSinRoFi1 f. and testA113_suppressWarnings1 f.

The issue was caused by multiply processing the same CUD, which caused trouble 
because the nlsTags are consumed during analysis, thus subsequent analysis 
would no longer find the tags to silence the warning:
 - TypeDeclaration.resolve caused duplication (class/ifc part)
 - the reconciler additionally calls CompilationUnitDeclaration.resolve
   (compiler normally descends via team unit -> team type -> role type)

Fixed by additional guards before calling unit.reportNLSProblems()
Comment 2 Stephan Herrmann CLA 2010-07-30 11:07:40 EDT
Patch has been committed as r648 f.
Comment 3 Stephan Herrmann CLA 2010-09-23 07:36:30 EDT
Verified using I201009211735