You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2014/05/28 14:51:12 UTC
svn commit: r1597999 -
/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
Author: rickhall
Date: Wed May 28 12:51:11 2014
New Revision: 1597999
URL: http://svn.apache.org/r1597999
Log:
Apply patch (FELIX-4524) to fix index out of bounds exception.
Modified:
felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
Modified: felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
URL: http://svn.apache.org/viewvc/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java?rev=1597999&r1=1597998&r2=1597999&view=diff
==============================================================================
--- felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java (original)
+++ felix/trunk/resolver/src/main/java/org/apache/felix/resolver/Candidates.java Wed May 28 12:51:11 2014
@@ -476,13 +476,26 @@ class Candidates
break;
}
}
+ if (candidates.isEmpty())
+ {
+ if (Util.isOptional(dependent))
+ {
+ clearCandidates(dependent);
+ }
+ else
+ {
+ String msg = "Unable to resolve " + dependent.getResource()
+ + ": missing requirement " + dependent;
+ throw new ResolutionException(msg, null, Collections.singleton(dependent));
+ }
+ }
}
}
}
}
}
- private boolean isSubstituted(Capability substitutableCap, Map<Capability, Integer> substituteStatuses) throws ResolutionException
+ private boolean isSubstituted(Capability substitutableCap, Map<Capability, Integer> substituteStatuses)
{
Integer substituteState = substituteStatuses.get(substitutableCap);
if (substituteState == null)