Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363169

Summary: CheckEValidatorAdapter error in runExtXptCheck() method, wrong gathering errors in isValid flag
Product: [Modeling] M2T Reporter: Christian Motika <cmot>
Component: XpandAssignee: Karsten Thoms <karsten.thoms>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms
Version: unspecifiedFlags: karsten.thoms: juno+
Target Milestone: M3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Christian Motika CLA 2011-11-08 08:47:07 EST
Build Identifier: 20110615-0604

org.eclipse.xtend.typesystem.emf.check.CheckEValidatorAdapter contains an error in method runExtXptCheck().

In line 178 the isValid boolean flag is computed wrong by conjunction with the hasError return value: "isValid &= issues.hasErrors();"

But obviously it should be the conjunction with the NEGATED hasErrors return value:
"isValid &= !issues.hasErrors();"



Reproducible: Always

Steps to Reproduce:
1. Use an EMF model that declares a class x referencing the type java.lang.String
2. Use another class y that has a value of type x (that also COULD be java.lang.String directly)
3. Generate code, tree editor
4. Observe that the CheckEValidator is run and the wrong code is executed
5. Observe a (wrong) error message pointing to a bad value in x: 'Feature x contains a bad value'
Comment 1 Karsten Thoms CLA 2011-11-09 04:33:03 EST
You are right, this is a mistake. Thanks for reporting!
Comment 2 Karsten Thoms CLA 2013-02-21 08:11:35 EST
Bug resolved before Xpand 1.2 release date => Closing