framework/src/main/java/org/apache/felix/framework/HookRegistry.java [178:204]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void removeHooks(final ServiceReference<?> ref)
    {
        final Object svcObj = ((ServiceRegistrationImpl.ServiceReferenceImpl) ref)
            .getRegistration().getService();
        final String [] classNames = (String[]) ref.getProperty(Constants.OBJECTCLASS);

        for(final String serviceName : classNames)
        {
            if (isHook(serviceName, svcObj))
            {
                synchronized (m_allHooks) // we need to sync as we replace the value
                {
                    SortedSet<ServiceReference<?>> hooks = m_allHooks.get(serviceName);
                    if (hooks != null)
                    {
                        hooks = new TreeSet<ServiceReference<?>>(hooks);
                        hooks.remove(ref);
                        m_allHooks.put(serviceName, hooks);
                    }
                }
            }
        }
        synchronized ( m_blackList )
        {
            m_blackList.remove(ref);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



connect/src/main/java/org/apache/felix/connect/felix/framework/HookRegistry.java [178:204]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void removeHooks(final ServiceReference<?> ref)
    {
        final Object svcObj = ((ServiceRegistrationImpl.ServiceReferenceImpl) ref)
            .getRegistration().getService();
        final String [] classNames = (String[]) ref.getProperty(Constants.OBJECTCLASS);

        for(final String serviceName : classNames)
        {
            if (isHook(serviceName, svcObj))
            {
                synchronized (m_allHooks) // we need to sync as we replace the value
                {
                    SortedSet<ServiceReference<?>> hooks = m_allHooks.get(serviceName);
                    if (hooks != null)
                    {
                        hooks = new TreeSet<ServiceReference<?>>(hooks);
                        hooks.remove(ref);
                        m_allHooks.put(serviceName, hooks);
                    }
                }
            }
        }
        synchronized ( m_blackList )
        {
            m_blackList.remove(ref);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



