You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (Resolved) (JIRA)" <ji...@apache.org> on 2011/10/10 17:59:29 UTC

[jira] [Resolved] (FELIX-3150) Filter parameter is ignored at getServiceReferences

     [ https://issues.apache.org/jira/browse/FELIX-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-3150.
------------------------------------

    Resolution: Fixed
      Assignee: Richard S. Hall

I committed a patch to pass the filter argument to the delegated method. We'll start a 4.0.1 release shortly. Thanks for catching this, please close if satisfied.
                
> Filter parameter is ignored at getServiceReferences
> ---------------------------------------------------
>
>                 Key: FELIX-3150
>                 URL: https://issues.apache.org/jira/browse/FELIX-3150
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.0.0
>            Reporter: Lucas Galfaso
>            Assignee: Richard S. Hall
>            Priority: Minor
>             Fix For: framework-4.0.1
>
>
> The method
> public <S> Collection<ServiceReference<S>> BundleContext::getServiceReferences(Class<S> clazz, String filter)
> is ignoring the filter parameter. Looking at BundleContextImpl code, it looks like that is the case
>    public <S> Collection<ServiceReference<S>> getServiceReferences(
>        Class<S> clazz, String filter)
>        throws InvalidSyntaxException
>    {
>        ServiceReference<S>[] refs =
>            (ServiceReference<S>[]) getServiceReferences(clazz.getName(), null);   /// The filter param should be here instead of the null.
>        return (refs == null)
>            ? Collections.EMPTY_LIST
>            : (Collection<ServiceReference<S>>) Arrays.asList(refs);
>    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira