Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363169 - CheckEValidatorAdapter error in runExtXptCheck() method, wrong gathering errors in isValid flag
Summary: CheckEValidatorAdapter error in runExtXptCheck() method, wrong gathering erro...
Status: CLOSED FIXED
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: M3   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 08:47 EST by Christian Motika CLA
Modified: 2013-02-21 08:11 EST (History)
1 user (show)

See Also:
karsten.thoms: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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