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 2010/10/25 22:20:16 UTC

svn commit: r1027255 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java

Author: rickhall
Date: Mon Oct 25 20:20:16 2010
New Revision: 1027255

URL: http://svn.apache.org/viewvc?rev=1027255&view=rev
Log:
Add some explanation. (FELIX-2670)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.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=1027255&r1=1027254&r2=1027255&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 Oct 25 20:20:16 2010
@@ -1574,6 +1574,23 @@ public class ModuleImpl implements Modul
         return false;
     }
 
+    /**
+     * Tries to determine whether the given class is part of the framework or not.
+     * Framework classes include everything in org.apache.felix.framework.* and
+     * org.osgi.framework.*. We also consider ClassLoader and Class to be internal
+     * classes, because they are inserted into the stack trace as a result of
+     * method overloading. Typically, ClassLoader or Class will be mixed in
+     * between framework classes or will be at the point where the class loading
+     * request enters the framework class loading mechanism, which will then be
+     * followed by either bundle or external code, which will then exit our
+     * attempt to determine if we should boot delegate or not. Other standard
+     * class loaders, like URLClassLoader, are considered external classes and
+     * should trigger boot delegation. This means that bundles can create standard
+     * class loaders to get access to boot packages, but this is the standard
+     * behavior of class loaders.
+     * @param clazz the class to determine if it is external or not.
+     * @return <tt>true</tt> if the class is external, otherwise <tt>false</tt>.
+     */
     private boolean isClassExternal(Class clazz)
     {
         if (clazz.getName().startsWith("org.apache.felix.framework."))
@@ -1592,10 +1609,6 @@ public class ModuleImpl implements Modul
         {
             return false;
         }
-//        else if (Proxy.class.equals(clazz))
-//        {
-//            return false;
-//        }
         return true;
     }