Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335546 - RemoveCrossReferences could throw ConcurrentModEx
Summary: RemoveCrossReferences could throw ConcurrentModEx
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-27 04:37 EST by Caspar D. CLA
Modified: 2011-06-23 03:40 EDT (History)
1 user (show)

See Also:
stepper: review+


Attachments
Patch v1 (1.35 KB, patch)
2011-01-27 04:40 EST, Caspar D. CLA
no flags Details | Diff
Patch v2 - ready to be committed (1.37 KB, patch)
2011-01-27 04:45 EST, Eike Stepper CLA
no flags Details | Diff

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