commit | 883cce3c84a1400f534cb676f54f5ee4e7712d73 | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Wed Aug 19 07:52:49 2015 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Wed Aug 19 07:52:49 2015 +0000 |
tree | 95e139923f7a4db6650aebd7ab7277f1bcf77cdb | |
parent | 06ed032ff51401f311c2c2644eefb786310dd854 [diff] |
[FELIX-4989] CopyOnWriteList.removeAll(Collection<?>) is incorrect causing failures for multiple cardinality resolution git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1696529 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/resolver/src/main/java/org/apache/felix/resolver/util/CopyOnWriteList.java b/resolver/src/main/java/org/apache/felix/resolver/util/CopyOnWriteList.java index b11e15b..b604434 100644 --- a/resolver/src/main/java/org/apache/felix/resolver/util/CopyOnWriteList.java +++ b/resolver/src/main/java/org/apache/felix/resolver/util/CopyOnWriteList.java
@@ -183,11 +183,12 @@ int idx = 0; for (int i = 0, l = o.length; i < l; i++) { if (c.contains(o[i])) { - modified = true; - } else if (modified) { - if (idx == 0) { + if (!modified) { d = o.clone(); + idx = i; + modified = true; } + } else if (modified) { d[idx++] = o[i]; } }