[FELIX-4942] Fix some errors not being propagated properly
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1690735 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/resolver/src/main/java/org/apache/felix/resolver/Candidates.java b/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
index 578706f..a764137 100644
--- a/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
+++ b/resolver/src/main/java/org/apache/felix/resolver/Candidates.java
@@ -531,6 +531,10 @@
{
if (result.error != null)
{
+ if (rethrow == null)
+ {
+ rethrow = result.error;
+ }
// Remove the candidate since we weren't able to
// populate its candidates.
itCandCap.remove();
@@ -1090,7 +1094,7 @@
PopulateResult result = m_populateResultCache.get(r.getResource());
result.success = false;
result.error =
- new MissingRequirementError(r);
+ new MissingRequirementError(r, m_populateResultCache.get(c.getResource()).error);
unresolvedResources.add(r.getResource());
}
}