felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r784796 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
Date Mon, 15 Jun 2009 14:44:55 GMT
Author: rickhall
Date: Mon Jun 15 14:44:53 2009
New Revision: 784796

URL: http://svn.apache.org/viewvc?rev=784796&view=rev
Log:
Slight modification to only call Class.forName() when an array
type is detected to avoid class circularity error. (FELIX-1233)

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=784796&r1=784795&r2=784796&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 Jun
15 14:44:53 2009
@@ -537,10 +537,14 @@
 
     public Class getClassByDelegation(String name) throws ClassNotFoundException
     {
-        // We do not call getClassLoader().loadClass() because this does not
-        // correctly handle array types, which is necessary in cases like
-        // deserialization using a wrapper class loader.
-        return Class.forName(name, false, getClassLoader());
+        // We do not call getClassLoader().loadClass() for arrays because
+        // it does not correctly handle array types, which is necessary in
+        // cases like deserialization using a wrapper class loader.
+        if (name.charAt(0) == '[')
+        {
+            return Class.forName(name, false, getClassLoader());
+        }
+        return getClassLoader().loadClass(name);
     }
 
     public URL getResourceByDelegation(String name)



Mime
View raw message