felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1001882 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: ModuleImpl.java resolver/WireImpl.java resolver/WireModuleImpl.java
Date Mon, 27 Sep 2010 19:24:25 GMT
Author: rickhall
Date: Mon Sep 27 19:24:25 2010
New Revision: 1001882

URL: http://svn.apache.org/viewvc?rev=1001882&view=rev
Log:
Even though getResources() from the module class loader should not return null,
we do return null internally when a cycle is detected, so we still need to be
prepared to see null internally. (FELIX-2629)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java?rev=1001882&r1=1001881&r2=1001882&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java Mon Sep
27 19:24:25 2010
@@ -861,8 +861,7 @@ public class ModuleImpl implements Modul
             // The spec states that if the bundle cannot be resolved, then
             // only the local bundle's resources should be searched. So we
             // will ask the module's own class path.
-            urls = getResourcesLocal(name);
-            return urls;
+            return getResourcesLocal(name);
         }
 
         // Get the package of the target class/resource.

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireImpl.java?rev=1001882&r1=1001881&r2=1001882&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireImpl.java
Mon Sep 27 19:24:25 2010
@@ -163,7 +163,7 @@ public class WireImpl implements Wire
             // If no resource was found, then we must throw an exception
             // since the exporter for this package did not contain the
             // requested class.
-            if (!urls.hasMoreElements())
+            if ((urls == null) || !urls.hasMoreElements())
             {
                 throw new ResourceNotFoundException(name);
             }

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java?rev=1001882&r1=1001881&r2=1001882&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/WireModuleImpl.java
Mon Sep 27 19:24:25 2010
@@ -145,7 +145,7 @@ public class WireModuleImpl implements W
         if (m_packages.contains(pkgName))
         {
             Enumeration urls = m_exporter.getResourcesByDelegation(name);
-            if (urls.hasMoreElements())
+            if ((urls != null) && urls.hasMoreElements())
             {
                 return urls;
             }



Mime
View raw message