You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Watson (JIRA)" <ji...@apache.org> on 2015/08/03 23:03:04 UTC
[jira] [Created] (FELIX-4989)
CopyOnWriteList.removeAll(Collection>) is incorrect causing failures for
multiple cardinality resolution
Thomas Watson created FELIX-4989:
------------------------------------
Summary: CopyOnWriteList.removeAll(Collection<?>) is incorrect causing failures for multiple cardinality resolution
Key: FELIX-4989
URL: https://issues.apache.org/jira/browse/FELIX-4989
Project: Felix
Issue Type: Bug
Components: Resolver
Environment: All
Reporter: Thomas Watson
The method org.apache.felix.resolver.Candidates.clearCandidates(Requirement, Collection<Capability>) uses the List.removeAll method which is backed by the org.apache.felix.resolver.util.CopyOnWriteList.removeAll(Collection<?>) implementation.
clearCandidates is used when a requirement has multiple cardinality and some subset of candidates causes a uses constraint violation. The clearCandidates method will remove the offending capabilities as long as there is at least one remaining capability that does not cause a uses constraint violation. The issue is the CopyOnWriteList.removeAll is not correct. If the last element in the list is the only element to be removed then the logic ends up removing all elements (by constructing and empty data array).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)