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

Bug 369651

Summary: org.eclipse.emf.ecore.util.EcoreUtil#EqualityHelper.equals(EObject,EObject) never removes map entries
Product: [Modeling] EMF Reporter: Max E. Kramer <max.kramer>
Component: CoreAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.