Bug 114759 - Runtime should not fail on querying providers which throws an exceptions
Summary: Runtime should not fail on querying providers which throws an exceptions
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: Wayne CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-11-02 09:34 EST by Alex Shatalin CLA
Modified: 2010-07-19 21:55 EDT (History)
0 users

See Also:


Attachments
org.eclipse.gmf.runtime.common.core.ExecutionStrategy patch (3.15 KB, patch)
2005-11-04 11:21 EST, Wayne CLA
no flags Details | Diff
org.eclipse.gmf.runtime.common.core.Service (3.39 KB, patch)
2005-11-04 11:22 EST, Wayne CLA
no flags Details | Diff
org.eclipse.gmf.tests.runtime.common.ui (9.14 KB, patch)
2005-11-04 11:22 EST, Wayne CLA
no flags Details | Diff
new plugin org.eclipse.gmf.tests.runtime.common.ui.services.provider patch (13.44 KB, patch)
2005-11-04 11:23 EST, Wayne CLA
no flags Details | Diff
org.eclipse.gmf.tests.runtime.common.ui.services.provider plugin (13.44 KB, application/octet-stream)
2005-11-04 11:24 EST, Wayne CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Shatalin CLA 2005-11-02 09:34:29 EST
Currently runtime fails if one of the providers throws an exception from 
provides() method. As a result, an "incorrect" provider could block all the 
operations just by throwing NullPointer exception from this method.

I suggest catching  all types of exceptions while querying the providers. As a 
result, exception thrown by "incorrect" provider will be logged and then 
runtime will continue querying the rest of providers, so operation which could 
be performed by some other "correct" provider will not be broken.
Comment 1 Wayne CLA 2005-11-04 11:21:15 EST
Created attachment 29340 [details]
org.eclipse.gmf.runtime.common.core.ExecutionStrategy patch
Comment 2 Wayne CLA 2005-11-04 11:22:08 EST
Created attachment 29341 [details]
org.eclipse.gmf.runtime.common.core.Service
Comment 3 Wayne CLA 2005-11-04 11:22:43 EST
Created attachment 29342 [details]
org.eclipse.gmf.tests.runtime.common.ui
Comment 4 Wayne CLA 2005-11-04 11:23:22 EST
Created attachment 29343 [details]
new plugin org.eclipse.gmf.tests.runtime.common.ui.services.provider patch
Comment 5 Wayne CLA 2005-11-04 11:24:15 EST
Created attachment 29344 [details]
org.eclipse.gmf.tests.runtime.common.ui.services.provider plugin

same as "29343: new plugin
org.eclipse.gmf.tests.runtime.common.ui.services.provider patch" except added
as binary
Comment 6 Anthony Hunter CLA 2005-11-07 15:47:20 EST
Commited the patches.

I also added an AllTests to the new provider plug-in with a comment to make it
clear that this is not a JUnit tests plug-in:

public class AllTests {

	/**
	 * The org.eclipse.gmf.tests.runtime.common.ui.services.provider tests
	 * plug-in is not a JUnit test plug-in. This plug-in is used by
	 * org.eclipse.gmf.tests.runtime.common.ui for ProviderPolicyExceptionsTest
	 * and ProviderPolicyTest.
	 */

}
Comment 7 Eclipse Webmaster CLA 2010-07-19 21:55:47 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Common was the original product and component for this bug