aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2011-07-28 12:43:37 (EDT)
committerPaul Webster2011-08-25 10:21:59 (EDT)
commit1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49 (patch)
treef6a124ab87735c9cd692d49bda413683aacd860c
parent74f3c6efc40a39b1f148206e97a20fbd8e77680c (diff)
downloadeclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.zip
eclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.tar.gz
eclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.tar.bz2
Bug 353248 [Compatibility] Disposable services created by the context
may not get disposed The logic for determining whether a retrieved service had to be disposed when the service locator got disposed was incorrect. This was because the get(String) method was being invoked on the context instead of the getLocal(String) method. This meant that the context would recurse upwards to search for a service when it should have only been looking at its own local cache.
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java
index c9cacbb..fc3c1cd 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/services/ServiceLocator.java
@@ -151,7 +151,7 @@ public final class ServiceLocator implements IDisposable, INestable,
// context has been destroyed so we should check our own local cache
// of services first before checking the registry
service = servicesToDispose.get(key);
- } else if (service == e4Context.get(key.getName())) {
+ } else if (service == e4Context.getLocal(key.getName())) {
// store this service retrieved from the context in the map only if
// it is a local service for this context, as otherwise we do not
// want to dispose it when this service locator gets disposed