You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2008/11/08 17:23:00 UTC
svn commit: r712403 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
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)
{