diff options
author | slewis | 2009-04-30 21:25:30 +0000 |
---|---|---|
committer | slewis | 2009-04-30 21:25:30 +0000 |
commit | a4ad4615729b9db0e3eb8a71170eeba8c1f83a73 (patch) | |
tree | 718cabcd782841f6bb0fc9a7b2c06e0ac3100d47 /framework/bundles/org.eclipse.ecf.identity/src/org | |
parent | a4e1f494146a7671209a8856a31d171bb106ac85 (diff) | |
download | org.eclipse.ecf-a4ad4615729b9db0e3eb8a71170eeba8c1f83a73.tar.gz org.eclipse.ecf-a4ad4615729b9db0e3eb8a71170eeba8c1f83a73.tar.xz org.eclipse.ecf-a4ad4615729b9db0e3eb8a71170eeba8c1f83a73.zip |
Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=274602
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.identity/src/org')
-rw-r--r-- | framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java index 4287116e7..185bbe966 100644 --- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java +++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java @@ -58,7 +58,9 @@ public class Activator implements BundleActivator { private ServiceTracker adapterManagerTracker = null; - public IAdapterManager getAdapterManager() { + public synchronized IAdapterManager getAdapterManager() { + if (this.context == null) + return null; // First, try to get the adapter manager via if (adapterManagerTracker == null) { adapterManagerTracker = new ServiceTracker(this.context, @@ -85,7 +87,9 @@ public class Activator implements BundleActivator { // public null constructor } - public IExtensionRegistry getExtensionRegistry() { + public synchronized IExtensionRegistry getExtensionRegistry() { + if (this.context == null) + return null; if (extensionRegistryTracker == null) { extensionRegistryTracker = new ServiceTracker(context, IExtensionRegistry.class.getName(), null); @@ -94,7 +98,7 @@ public class Activator implements BundleActivator { return (IExtensionRegistry) extensionRegistryTracker.getService(); } - public DebugOptions getDebugOptions() { + public synchronized DebugOptions getDebugOptions() { if (context == null) return null; if (debugOptionsTracker == null) { @@ -200,7 +204,9 @@ public class Activator implements BundleActivator { return context.getBundle(); } - protected LogService getLogService() { + protected synchronized LogService getLogService() { + if (this.context == null) + return null; if (logServiceTracker == null) { logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null); |