Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324521 - [Duplicate] Incorrect implementation of DelegatingEcoreEList.contains() method
Summary: [Duplicate] Incorrect implementation of DelegatingEcoreEList.contains() method
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 318592
Blocks:
  Show dependency tree
 
Reported: 2010-09-04 13:34 EDT by Ed Merks CLA
Modified: 2010-11-05 05:41 EDT (History)
2 users (show)

See Also:


Attachments

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