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

Bug 361127

Summary: AbstractActivityManager does not manage listeners properly
Product: [Eclipse Project] Platform Reporter: Dean Roberts <dean.t.roberts>
Component: UIAssignee: Dean Roberts <dean.t.roberts>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: 3.8   
Target Milestone: 3.8 M3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Dean Roberts CLA 2011-10-17 08:35:51 EDT
AbstractActivityManager uses an ArrayList to manage its listeners.

The result is that if listeners are removed by a listener handler, then not all registered listeners will receive event notification.

The fix is simply to use ListenerList to store the list of Listeners and not ArrayList.

This problem (and fix) is similar and related to bug 359887.
Comment 1 Dean Roberts CLA 2011-10-17 10:15:12 EDT
Created attachment 205332 [details]
Patch
Comment 2 Dean Roberts CLA 2011-10-17 10:16:53 EDT
I think this patch should probably be back ported to the 3.x stream.  I have confirmed that listeners are being removed by the event handler.