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 <[email protected]> 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

Reply via email to