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

Bug 362444

Summary: Wrap participant disposal in a safe runnable
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: TeamAssignee: Platform Team Inbox <platform-team-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: tomasz.zarna
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Remy Suen CLA 2011-10-30 19:21:52 EDT
I was reviewing some code in Gerrit when I noticed this exception while shutting down my inner.

I think that SynchronizationManager should catch all exceptions that are thrown by a participant's disposal and log it. Right now, a runtime exception will cause other participants to not get iterated over and disposed. It also seems like the rest of TeamUIPlugin's stop(*) method will not complete normally. As we have no control over what goes on in a client's code, we should ensure that errors in one piece of client code does not affect the operation (or disposal in this case) of other client code.

Caused by: java.lang.NullPointerException
	at org.eclipse.egit.core.synchronize.GitSubscriberMergeContext.dispose(GitSubscriberMergeContext.java:104)
	at org.eclipse.team.ui.synchronize.ModelSynchronizeParticipant.dispose(ModelSynchronizeParticipant.java:253)
	at org.eclipse.team.internal.ui.synchronize.SynchronizeManager.dispose(SynchronizeManager.java:574)
	at org.eclipse.team.internal.ui.TeamUIPlugin.stop(TeamUIPlugin.java:250)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764)
Comment 1 Lars Vogel CLA 2019-11-14 03:38:23 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.