Community
Participate
Working Groups
Build Identifier: I20110613-1736 If removeBreakpointListener() is called after the BreakpointManager has been shut down by the DebugPlugin, a NPE is thrown, because some fields in BreakpointManager are set to null in shutdown(). The methods to add/remove listeners should either check whether the field are null and do nothing in this case, or the method DebugPlugin.isShuttingDown() should be public to allow clients to check whether a shut down is currently going on. In the latter case, client can avoid calls to the add/remove listener methods. Reproducible: Always
Created attachment 200026 [details] Proposed simple fix.
It seems that the most correct thing to do would be to add another synchronization object that is set at shutdown and checked before every listener add/remove. This seems like a lot of fluff for the edge case. Instead I think we can just clear the lists instead of setting them to null. Mike, do you agree?
Makes sense.
Applied a version of the patch that does not have a compile error in it to HEAD.
Verified in I20110912-2126