Bug 559046 - [JFace] Listener handling in ManagedForm.fireSelectionChanged wrong
Summary: [JFace] Listener handling in ManagedForm.fireSelectionChanged wrong
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.15   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-10 14:04 EST by Carsten Hammer CLA
Modified: 2020-01-10 14:04 EST (History)
0 users

See Also:


Attachments

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