felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r712403 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
Date Sat, 08 Nov 2008 16:23:00 GMT
Author: rickhall
Date: Sat Nov  8 08:22:59 2008
New Revision: 712403

URL: http://svn.apache.org/viewvc?rev=712403&view=rev
Log:
Fixed Felix' delegation hack so that it correctly delegates to the parent
class loader for resources as appropriate; previously it was always delegating
for class loading, which was incorrect. (FELIX-808)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java?rev=712403&r1=712402&r2=712403&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
Sat Nov  8 08:22:59 2008
@@ -605,7 +605,10 @@
                 {
                     try
                     {
-                        return this.getClass().getClassLoader().loadClass(name);
+                        // Return the class or resource from the parent class loader.
+                        return (isClass)
+                            ? (Object) this.getClass().getClassLoader().loadClass(name)
+                            : (Object) this.getClass().getClassLoader().getResource(name);
                     }
                     catch (NoClassDefFoundError ex)
                     {



Mime
View raw message