diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java')
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java index 8c8a8249a..320d68957 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java @@ -72,7 +72,6 @@ import org.osgi.resource.Capability; */ public class BundleContextImpl implements BundleContext, EventDispatcher<Object, Object, Object> { - static final String findHookName = FindHook.class.getName(); /** true if the bundle context is still valid */ private volatile boolean valid; @@ -258,10 +257,8 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object, if (debug.DEBUG_HOOKS) { Debug.println("notifyBundleFindHooks(" + allBundles + ")"); //$NON-NLS-1$ //$NON-NLS-2$ } - container.getServiceRegistry().notifyHooksPrivileged(findHookName, "find", (hook, hookRegistration) -> { //$NON-NLS-1$ - if (hook instanceof FindHook) { - ((FindHook) hook).find(context, allBundles); - } + container.getServiceRegistry().notifyHooksPrivileged(FindHook.class, "find", (hook, hookRegistration) -> { //$NON-NLS-1$ + hook.find(context, allBundles); }); } |