Bug 538697 - ClassCastException in FeatureMapChangeMerger when FeatureMap.Enry<EStructuralFeature, Boolean> should be removed
Summary: ClassCastException in FeatureMapChangeMerger when FeatureMap.Enry<EStructural...
Status: UNCONFIRMED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: 3.3.0   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: EMF Compare CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-06 04:23 EDT by Eduard Weiss CLA
Modified: 2019-03-04 11:21 EST (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 Eduard Weiss CLA 2018-09-06 04:23:05 EDT
In our current metamodel an element DMNElement has an attribute "anyAttribute" of type "EFeatureMapEntry" if bounds [0..*]
We use this attribute to store additional information like (editable=true).
The setting we modeled as EReference with Type boolean.

Then we now try to compare to metemodel instances like:

 <dmn:element name="Test"> 


WITH

 <dmn:element name="Test" xxx:editable="false"> 


THEN

FeatureMapChangeMerger#removeFeatureMapValueFromTarget throws exception. It tries to cast value of type boolean to EObject
Comment 1 Eclipse Genie CLA 2018-09-06 04:33:34 EDT
New Gerrit change created: https://git.eclipse.org/r/128816
Comment 2 Laurent Goubet CLA 2018-09-06 04:34:47 EDT
This change should fix this particular ClassCastException but there is no guarantee that no other exception can happen with non eobject feature maps since this hasn't been extensively tested. Would you be able to provide a unit test trying to replay your comparison?
Comment 3 Eduard Weiss CLA 2018-09-06 10:51:10 EDT
Ok, I will provide you a test