Use Class.forName() for class load delegation since it handles
array types. (FELIX-1233)
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@784127 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
index 0cfa3bd..316fbab 100644
--- a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
@@ -492,7 +492,10 @@
public Class getClassByDelegation(String name) throws ClassNotFoundException
{
- return getClassLoader().loadClass(name);
+ // 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());
}
public URL getResourceByDelegation(String name)