Permalink
Browse files

Work around classloader bug in JDK 6.

The bug, reported to us by Toby Cabot, is described here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500212
  • Loading branch information...
jsampson committed Mar 12, 2009
1 parent e453df5 commit f50708f9bde69a504a0d4429dbf14e55b727a928
View
@@ -2,6 +2,7 @@ Thanks to Prevayler contributors:
Aleksey Aristov
Eric Bridgwater
+ Toby Cabot
Peter Haig
Tobias Hill
Jacob Kjome
@@ -1,7 +1,6 @@
//Prevayler(TM) - The Free-Software Prevalence Layer.
//Copyright (C) 2001-2003 Klaus Wuestefeld
//This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-//Contributions: Aleksey Aristov.
package org.prevayler.foundation;
@@ -23,6 +22,6 @@ public ObjectInputStreamWithClassLoader(InputStream stream, ClassLoader loader)
protected Class resolveClass(ObjectStreamClass v) throws IOException, ClassNotFoundException
{
- return(_loader != null ? _loader.loadClass(v.getName()) : super.resolveClass(v));
+ return(_loader != null ? Class.forName(v.getName(), false, _loader) : super.resolveClass(v));
}
}

0 comments on commit f50708f

Please sign in to comment.