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

Bug 359565

Summary: Editor "Destroy" Listener not called when previous listener removes itself
Product: [ECD] Orion Reporter: Silenio Quarti <Silenio_Quarti>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.3   
Target Milestone: 0.3 RC1   
Hardware: PC   
OS: All   
Whiteboard:

Description Silenio Quarti CLA 2011-09-30 09:49:08 EDT
If a listener of a event in the editor removes itself during the event callback, the listener that follows in the sequence of listeners is not called.

The problem is that the array of listeners is modified while iteration over it.
Comment 1 Silenio Quarti CLA 2011-09-30 12:18:13 EDT
Fixed 
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8b2083e13cf92fb9ee6433d9d3afef4a35935213

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4393770fec3d11da18208397a5eb1bc74832dff3

Note that the first patch did not fix two problems:

- listeners added during an event would not run
- listeners removed during an event could still still run