aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <>
Subject [jira] [Commented] (ARIES-1439) Aries ResolveContext.insertHostedCapability() calls unsupported add() method on capabilies
Date Wed, 28 Oct 2015 16:43:27 GMT


John Ross commented on ARIES-1439:

Equinox uses a version of the Felix Resolver that is not far from the latest. The org.apache.felix.resolver.util.CopyOnWriteList.add
method does not throw an UnsupportedOperationException there. Looks like the change first
appears here: Please note
that although CopyOnWriteList is in an internal package, the implementation has been publicly
exposed to implementers of the ResolveContext via the insertHostedCapability method, and this
is a breaking change.

> Aries ResolveContext.insertHostedCapability() calls unsupported add() method on capabilies
> ------------------------------------------------------------------------------------------
>                 Key: ARIES-1439
>                 URL:
>             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(
> 	at org.apache.aries.subsystem.core.internal.ResolveContext.insertHostedCapability(
> 	at org.apache.felix.resolver.Candidates.prepare(
> 	at org.apache.felix.resolver.ResolverImpl.resolve(
> 	at org.apache.felix.resolver.ResolverImpl.resolve(
> 	at org.apache.aries.subsystem.core.internal.SubsystemResource.computeDependencies({code}

This message was sent by Atlassian JIRA

View raw message