felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucas Galfaso <lgalf...@gmail.com>
Subject Re: Filter parameter is ignored at getServiceReferences
Date Thu, 06 Oct 2011 17:29:17 GMT
Just created one.
Thanks

On Thu, Oct 6, 2011 at 2:06 PM, Richard S. Hall <heavy@ungoverned.org> wrote:
> Yes, that looks like an oversight, did you open an issue for it? We'll do a 4.0.1 release
next week hopefully and did this as well as another issue with singletons.
>
> Until then, just use the non-generic version of the method.
>
> --
> Sent from my phone, please excuse my brevity.
>
> Lucas Galfaso <lgalfaso@gmail.com> wrote:
>
> Hi All,
> I just started doing some tests with Felix Framework 4.0 and it looks like
> 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);
> }
>
>
> Thanks,
> Lucas
>
>

Mime
View raw message