Bug 559046

Summary: [JFace] Listener handling in ManagedForm.fireSelectionChanged wrong
Product: [Eclipse Project] Platform Reporter: Carsten Hammer <carsten.hammer>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.15   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Carsten Hammer CLA 2020-01-10 14:04:20 EST
Another one of these issues where in a loop over a listeners list code is called that in this iteration modifies the original list. We find this pattern in a number of cases in eclipse and after a refactoring to a foreach loop (which is nothing than an iterator) you get a ConcurrentModificationException.

Here is the rollback that was needed to get rid of the ConcurrentModificationException:

https://git.eclipse.org/r/#/c/155341/

What would really good if there were a junit test case for this problem.
Until now I am not aware of a single test case that covers this issue that is highly visible at runtime.


The bugreport after the refactoring is here:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=558688

Similar issue is

https://bugs.eclipse.org/bugs/show_bug.cgi?id=558510
https://bugs.eclipse.org/bugs/show_bug.cgi?id=558339