Author: rickhall
Date: Mon Oct  5 18:49:41 2015
New Revision: 1706895

URL: http://svn.apache.org/viewvc?rev=1706895&view=rev
Log:
Apply patch to avoid resolve failures for optional fragments (FELIX-5061)

Modified:
    
felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java

Modified: 
felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java?rev=1706895&r1=1706894&r2=1706895&view=diff
==============================================================================
--- 
felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java 
(original)
+++ 
felix/trunk/resolver/src/main/java/org/apache/felix/resolver/ResolverImpl.java 
Mon Oct  5 18:49:41 2015
@@ -2235,6 +2235,10 @@ public class ResolverImpl implements Res
             this.m_allCandidates = allCandidates;
             this.m_resource = resource;
             this.m_pkgName = pkgName;
+            if (blame1 == null)
+            {
+                throw new NullPointerException("First blame cannot be null.");
+            }
             this.m_blame1 = blame1;
             this.m_blame2 = blame2;
         }
@@ -2276,7 +2280,9 @@ public class ResolverImpl implements Res
         public Collection<Requirement> getUnresolvedRequirements() {
             if (m_blame2 == null)
             {
-                return Collections.emptyList();
+                // This is an export conflict so there is only the first blame;
+                // use its requirement.
+                return Collections.singleton(m_blame1.m_reqs.get(0));
             }
             else
             {


Reply via email to