Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
subsystem-core-2.0.4
-
None
Description
The method
org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(List<Capability> capabilities, HostedCapability hostedCapability)
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:
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)