Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330258 - [Undo] ConcurrentModificationException in DefaultOperationHistory.filter()
Summary: [Undo] ConcurrentModificationException in DefaultOperationHistory.filter()
Status: CLOSED DUPLICATE of bug 323444
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Susan McCourt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-15 10:43 EST by Carsten Reckord CLA
Modified: 2010-12-15 16:44 EST (History)
1 user (show)

See Also:


Attachments
synchronizes iterator access (931 bytes, patch)
2010-11-15 10:44 EST, Carsten Reckord CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Reckord CLA 2010-11-15 10:43:06 EST
The iterator used in DefaultOperationHistory.filter(...) is not properly synchronized against comodification, allowing asynchronous modification of the list between obtaining the iterator and entering the following synchronized block. This leads to

java.util.ConcurrentModificationException
	at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
	at java.util.AbstractList$Itr.next(AbstractList.java:343)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.filter(DefaultOperationHistory.java:558)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.getUndoHistory(DefaultOperationHistory.java:843)
Comment 1 Carsten Reckord CLA 2010-11-15 10:44:18 EST
Created attachment 183125 [details]
synchronizes iterator access
Comment 2 Susan McCourt CLA 2010-12-15 16:44:36 EST
Thanks, Cartsten.  This rang a bell and I realized that the same problem (and patch) was reported in bug 323444.  Marking this a duplicate and I will get the patch into M5.  Sorry for the delay.

*** This bug has been marked as a duplicate of bug 323444 ***