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

Bug 335546

Summary: RemoveCrossReferences could throw ConcurrentModEx
Product: [Modeling] EMF Reporter: Caspar D. <caspar_d>
Component: cdo.coreAssignee: Caspar D. <caspar_d>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3 CC: saulius.tvarijonas
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1
none
Patch v2 - ready to be committed none

Description Caspar D. CLA 2011-01-27 04:37:39 EST

    
Comment 1 Caspar D. CLA 2011-01-27 04:40:19 EST
See CDOTransactionImpl.removeCrossReferences(*).

The removal of the referencedObject is done while iterating
over the 'referencers' collection. This will cause a 
ConcurrentModEx if the referencedObject is itself also
a referencer.
Comment 2 Caspar D. CLA 2011-01-27 04:40:58 EST
Created attachment 187716 [details]
Patch v1
Comment 3 Caspar D. CLA 2011-01-27 04:41:45 EST
Patch moves removal out of the iteration by collecting
the 'objectsToBeRemoved' in a list first.
Comment 4 Eike Stepper CLA 2011-01-27 04:45:26 EST
Created attachment 187717 [details]
Patch v2 - ready to be committed
Comment 5 Caspar D. CLA 2011-01-28 04:39:24 EST
Committed to trunk, rev. 6953
Comment 6 Eike Stepper CLA 2011-06-23 03:40:43 EDT
Available in R20110608-1407