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

Bug 324521

Summary: [Duplicate] Incorrect implementation of DelegatingEcoreEList.contains() method
Product: [Modeling] EMF Reporter: Ed Merks <Ed.Merks>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: rimvydas, stepper
Version: 2.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 318592    
Bug Blocks:    

Description Ed Merks CLA 2010-09-04 13:34:58 EDT
+++ This bug was initially created as a clone of Bug #318592 +++

Created an attachment (id=173211)
Test project archive

Open attached project. 
Run Test.

Expected result:
Test finished: no errors

Actual result:
Error found. index = 4
Error found. index = 5
Error found. index = 6
Test finished: errors found

It seems that implementation of the org.eclipse.emf.ecore.util.DelegatingEcoreEList.contains(Object) method incorrect.

in line 464: eObject.eContainerFeatureID() == getInverseFeatureID()

eObject.eContainerFeatureID() - feature ID with offset
getInverseFeatureID()         - feature ID without offset

It works ok with models with no multiple inheritance but fails with models that uses multiple inheritance.
Comment 1 Ed Merks CLA 2010-09-04 13:36:27 EDT
The fix is committed to CVS for 2.7.
Comment 2 Ed Merks CLA 2010-11-05 05:41:37 EDT
The fix is available in the latest build for the stream.