Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349052 - Concurrent modification in change recorder
Summary: Concurrent modification in change recorder
Status: VERIFIED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 11:07 EDT by Kenn Hussey CLA
Modified: 2011-08-31 22:19 EDT (History)
0 users

See Also:
Kenn.Hussey: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenn Hussey CLA 2011-06-10 11:07:10 EDT
A concurrent modification exception occurs while consolidating the changes in a change recorder that is attached to objects with (unresolved) container proxies:

Caused by: java.util.ConcurrentModificationException
   at org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:762)
   at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:710)
   at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:696)
   at org.eclipse.emf.ecore.change.util.ChangeRecorder.consolidateChanges(ChangeRecorder.java:231)


The fix is to change the isOrphan(EObject) method like this:

protected boolean isOrphan(EObject eObject) {
	return ((InternalEObject) eObject).eInternalContainer() == null && eObject.eResource() == null;
}
Comment 1 Kenn Hussey CLA 2011-08-29 18:12:21 EDT
The fix has been committed to CVS (head and maintenance).
Comment 2 Kenn Hussey CLA 2011-08-29 19:51:17 EDT
The fix is available in maintenance build M201108291525 and integration build I201108291838.