felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r888439 - /felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
Date Tue, 08 Dec 2009 15:20:24 GMT
Author: rickhall
Date: Tue Dec  8 15:20:24 2009
New Revision: 888439

URL: http://svn.apache.org/viewvc?rev=888439&view=rev
Log:
Fix NPE for optional imports.

Modified:
    felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java

Modified: felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java?rev=888439&r1=888438&r2=888439&view=diff
==============================================================================
--- felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
(original)
+++ felix/sandbox/rickhall/resolver/src/main/java/org/apache/felix/resolver/felix/FelixResolver.java
Tue Dec  8 15:20:24 2009
@@ -157,7 +157,7 @@
         {
             List<Capability> matches = new ArrayList<Capability>();
             List<Capability> candidates = m_unresolvedPkgIndex.get(((RequirementImpl)
req).getName());
-            for (int candIdx = 0; candIdx < candidates.size(); candIdx++)
+            for (int candIdx = 0; (candidates != null) && (candIdx < candidates.size());
candIdx++)
             {
                 Capability export = candidates.get(candIdx);
                 if (((RequirementImpl) req).isSatistfiedBy(export))



Mime
View raw message