diff options
| author | Remy Suen | 2011-07-28 16:43:37 +0000 |
|---|---|---|
| committer | Paul Webster | 2011-08-25 14:21:59 +0000 |
| commit | 1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49 (patch) | |
| tree | f6a124ab87735c9cd692d49bda413683aacd860c | |
| parent | 74f3c6efc40a39b1f148206e97a20fbd8e77680c (diff) | |
| download | eclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.tar.gz eclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.tar.xz eclipse.platform.ui-1dfcf4e96bcc6249163d07c5ff5ec4ea710dec49.zip | |
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.java | 2 |
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 c9cacbb064c..fc3c1cd29c4 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 |
