You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Pierre De Rop <pi...@gmail.com> on 2016/05/03 15:57:53 UTC

[SCR] Suspicious method in MultiplePrototypeRefPair ?

Hello all;

if the scr codebase (felix-trunk), I see that the
MultiplePrototypeRefPair.unsetServiceObject(ComponentContextImpl<S> key)
does this:

    @Override
    public T unsetServiceObject(ComponentContextImpl<S> key)
    {
        return instances.get(key);
    }

Is there a bug here ? shouldn't this method do something like:

    @Override
    public T unsetServiceObject(ComponentContextImpl<S> key)
    {
        return instances.remove(key);
    }


thanks;

best regards;
/Pierre