diff options
author | slewis | 2010-05-16 17:13:49 +0000 |
---|---|---|
committer | slewis | 2010-05-16 17:13:49 +0000 |
commit | 8727ef8499ad095b19cdd63fc99a711037d3e2cb (patch) | |
tree | 6dcdfe6b3667ddba54c60ea357d710ea2068049c | |
parent | 250b72607e60c0e6b8b02ec87d963eb8d26ca7d9 (diff) | |
download | org.eclipse.ecf-8727ef8499ad095b19cdd63fc99a711037d3e2cb.tar.gz org.eclipse.ecf-8727ef8499ad095b19cdd63fc99a711037d3e2cb.tar.xz org.eclipse.ecf-8727ef8499ad095b19cdd63fc99a711037d3e2cb.zip |
Made log method calls more robust in multi-threaded environment
2 files changed, 6 insertions, 2 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java index 47361747a..c57c54c74 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/AbstractRemoteService.java @@ -278,7 +278,9 @@ public abstract class AbstractRemoteService implements IRemoteService, Invocatio } protected void logWarning(String string, Throwable e) { - Activator.getDefault().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, string)); + Activator a = Activator.getDefault(); + if (a != null) + a.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, string)); } } diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java index 162aae078..38040f097 100644 --- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java +++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java @@ -434,7 +434,9 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen } protected void logException(String string, Throwable e) { - Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, string, e)); + Activator a = Activator.getDefault(); + if (a != null) + a.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, string, e)); } protected ID getRemoteCallTargetID() { |