David Bosschaert created ARIES-1439:
---------------------------------------
Summary: Aries ResolveContext.insertHostedCapability() calls
unsupported add() method on capabilies
Key: ARIES-1439
URL: https://issues.apache.org/jira/browse/ARIES-1439
Project: Aries
Issue Type: Bug
Components: Subsystem
Affects Versions: subsystem-core-2.0.4
Reporter: David Bosschaert
Assignee: David Bosschaert
Fix For: subsystem-2.0.6
The method
{code}org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(List<Capability>
capabilities, HostedCapability hostedCapability){code}
calls {{capabilities.add(hostedCapability)}}.
However the key reason for this callback is to insert this capability at the
correct position in the capabilities list. The Felix implementation of the List
provided insist on a call to {{add(idx, capability)}} which seems to make sense
in this context.
Currently this call causes the following exception:
{code}java.lang.UnsupportedOperationException: null
at
org.apache.felix.resolver.util.CopyOnWriteList.add(CopyOnWriteList.java:135)
at
org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(ResolveContext.java:101)
at org.apache.felix.resolver.Candidates.prepare(Candidates.java:934)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:232)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:158)
at
org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies(SubsystemResource.java:372){code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)