Thomas Watson created FELIX-4727:
------------------------------------
Summary: WrappedResource.getCapabilities ignores the namespace
param
Key: FELIX-4727
URL: https://issues.apache.org/jira/browse/FELIX-4727
Project: Felix
Issue Type: Bug
Components: Resolver
Environment: All
Reporter: Thomas Watson
The overall design of org.apache.felix.resolver.WrappedResource is that it is
an internal type to the ResolverImpl and is not exposed to external code. The
fact that it does not pay attention to the namespace param is an oversite, but
not one that effects the ResolverImpl since it uses a null param anyway and
does its own filtering of the capabilities.
But there is a case where this type will get exposed to code outside the
resolver implementation. That is when calling
org.osgi.service.resolver.ResolveContext.insertHostedCapability(List<Capability>,
HostedCapability).
If the implementation of that method calls getResource on any of the
capabilities of the list or the HostedCapability they will be exposed to the
WrappedResource. I know of one case where this causes issues when the client
code is trying to get the osgi.identity capability of the WrappedResource. All
capabilities are being returned by the first one is not the expected
osgi.identity.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)