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

Bug 330258

Summary: [Undo] ConcurrentModificationException in DefaultOperationHistory.filter()
Product: [Eclipse Project] Platform Reporter: Carsten Reckord <reckord>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact: Susan McCourt <susan>
Severity: normal    
Priority: P3 CC: pwebster
Version: 3.6.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
synchronizes iterator access none

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 ***