felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r698580 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
Date Wed, 24 Sep 2008 14:13:13 GMT
Author: pauls
Date: Wed Sep 24 07:13:12 2008
New Revision: 698580

URL: http://svn.apache.org/viewvc?rev=698580&view=rev
Log:
Do not bootdelegate in case Bundle.loadClass() has been used. (FELIX-712)

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=698580&r1=698579&r2=698580&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
Wed Sep 24 07:13:12 2008
@@ -54,6 +54,7 @@
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.PackagePermission;
 import org.osgi.framework.Version;
+import org.osgi.framework.Bundle;
 
 public class R4SearchPolicyCore implements ModuleListener
 {
@@ -595,7 +596,13 @@
                         break;
                     }
                 }
-                if (delegate)
+                // If delegate is true then there are no bundles 
+                // providing exports for this package and the instigating 
+                // class was not from a bundle. Therefore, 
+                // delegate to the parent class loader in case
+                // that this is not due to outside code calling a method
+                // on the bundle interface (e.g., Bundle.loadClass()).
+                if (delegate && !Bundle.class.isInstance(classes[i - 1])) 
                 {
                     try
                     {



Mime
View raw message