commit | 6701f527ef3ce05f4e7739f557904e5385e4fa0b | [log] [tgz] |
---|---|---|
author | Guillaume Nodet <gnodet@apache.org> | Fri Feb 19 23:13:35 2010 +0000 |
committer | Guillaume Nodet <gnodet@apache.org> | Fri Feb 19 23:13:35 2010 +0000 |
tree | ec888213a003f27949524ffdfaaa108b66306500 | |
parent | 4eb49be9158ab90883117bd106bbbc31f4778fbd [diff] |
FELIX-2114: The reasons for adding a resource may contain the same requirement several times git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@912029 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java index f0865d0..6b58621 100644 --- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java +++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
@@ -621,6 +621,13 @@ } else { + for (int reqIdx = 0; reqIdx < reasons.length; reqIdx++) + { + if (req.equals(reasons[reqIdx])) + { + return; + } + } Requirement[] tmp = new Requirement[reasons.length + 1]; System.arraycopy(reasons, 0, tmp, 0, reasons.length); tmp[reasons.length] = req;