You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pa...@apache.org on 2007/09/13 23:40:47 UTC

svn commit: r575471 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java

Author: pauls
Date: Thu Sep 13 14:40:46 2007
New Revision: 575471

URL: http://svn.apache.org/viewvc?rev=575471&view=rev
Log:
Per spec a call to PackageAdmin.getBundle(Class) should return the Bundle that has the classloader that loaded this class. We only return the bundle if it is a real one (i.e., not the system bundle). This returns the system bundle in case the class comes from the classloader (or one of its parents) that loaded Felix and the system bundle exports the package.

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

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=575471&r1=575470&r2=575471&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Thu Sep 13 14:40:46 2007
@@ -2839,7 +2839,7 @@
                 }
             }
         }
-        return null;
+        return (getInfo().getCurrentModule().getClass(clazz.getName()) == clazz) ? this : null;
     }
 
     /**