Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-04-28 12:34:52 -0400
committerslewis2009-04-28 12:34:52 -0400
commit860ac5e46e5ef204ad2c394177b50a5067e59a3e (patch)
treeb37a960b5e47f84ea87be41e7c040b8b08b170be /providers
parent4da70dec79b3f28c91bc7e27bd99f1ae67a78091 (diff)
downloadorg.eclipse.ecf-860ac5e46e5ef204ad2c394177b50a5067e59a3e.tar.gz
org.eclipse.ecf-860ac5e46e5ef204ad2c394177b50a5067e59a3e.tar.xz
org.eclipse.ecf-860ac5e46e5ef204ad2c394177b50a5067e59a3e.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=274078
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
index 7d1e77b93..7207d7c65 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/internal/provider/filetransfer/Activator.java
@@ -176,14 +176,16 @@ public class Activator implements BundleActivator {
//
}
- protected synchronized LogService getLogService() {
- if (this.context == null)
- return null;
- if (logServiceTracker == null) {
- logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
- logServiceTracker.open();
+ protected LogService getLogService() {
+ synchronized (this) {
+ if (this.context == null)
+ return null;
+ if (logServiceTracker == null) {
+ logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null);
+ logServiceTracker.open();
+ }
+ return (LogService) logServiceTracker.getService();
}
- return (LogService) logServiceTracker.getService();
}
public IProxyService getProxyService() {
@@ -262,8 +264,6 @@ public class Activator implements BundleActivator {
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext ctxt) throws Exception {
- plugin = null;
- this.context = null;
final IExtensionRegistry registry = getExtensionRegistry();
if (registry != null) {
registry.removeRegistryChangeListener(registryChangeListener);
@@ -289,7 +289,6 @@ public class Activator implements BundleActivator {
proxyServiceTracker.close();
proxyServiceTracker = null;
}
- this.context = null;
if (this.retrieveFileTransferProtocolMap != null) {
this.retrieveFileTransferProtocolMap.clear();
this.retrieveFileTransferProtocolMap = null;
@@ -302,6 +301,10 @@ public class Activator implements BundleActivator {
this.browseFileTransferProtocolMap.clear();
this.browseFileTransferProtocolMap = null;
}
+ synchronized (this) {
+ this.context = null;
+ }
+ plugin = null;
}
/**

Back to the top