You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directmemory.apache.org by ol...@apache.org on 2012/06/12 18:38:48 UTC
svn commit: r1349429 -
/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
Author: olamy
Date: Tue Jun 12 16:38:48 2012
New Revision: 1349429
URL: http://svn.apache.org/viewvc?rev=1349429&view=rev
Log:
[DIRECTMEMORY-88] Unable to retrieve JDK types (Integer, byte, ..) with the StandardSerializer
Submitted by Jeff Maury.
Modified:
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
Modified: incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
URL: http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java?rev=1349429&r1=1349428&r2=1349429&view=diff
==============================================================================
--- incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java (original)
+++ incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java Tue Jun 12 16:38:48 2012
@@ -60,7 +60,10 @@ public final class StandardSerializer
protected Class<?> resolveClass( ObjectStreamClass objectStreamClass )
throws IOException, ClassNotFoundException
{
- return clazz.getClassLoader().loadClass( objectStreamClass.getName() );
+ ClassLoader classLoader = clazz.getClassLoader();
+ return classLoader != null
+ ? classLoader.loadClass( objectStreamClass.getName() )
+ : Class.forName( objectStreamClass.getName() );
}
};