Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369651 - org.eclipse.emf.ecore.util.EcoreUtil#EqualityHelper.equals(EObject,EObject) never removes map entries
Summary: org.eclipse.emf.ecore.util.EcoreUtil#EqualityHelper.equals(EObject,EObject) n...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 08:02 EST by Max E. Kramer CLA
Modified: 2012-03-31 14:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max E. Kramer CLA 2012-01-25 08:02:30 EST
Build Identifier: 20110916-0149

The method equals(EObject,EObject) of org.eclipse.emf.ecore.util.EcoreUtil#EqualityHelper never removes entries from the map that stores all equal objects. This means that when this method returns false because the call to !haveEqualFeature(eObject1, eObject2, feature) (line 2272 in v 1.75 2011/05/12 15:08:56) returns false the next invocation with the same arguments will return true!

This can be fixed by simply adding a call to remove before the corresponding return false statement (in line 2274).

Reproducible: Always

Steps to Reproduce:
1. Find two EObjects for which the call to equals(EObject,EObject) fails at the stated point (and not earlier).
Comment 1 Ed Merks CLA 2012-01-25 09:03:25 EST
The fix has been committed to git for 2.8.
Comment 2 Ed Merks CLA 2012-01-26 05:05:22 EST
Should be in the build we didn't yesterday.
Comment 3 Ed Merks CLA 2012-03-31 14:24:02 EDT
The changes are available in the M6 build.