set thread context class loader before deserialization

This commit is contained in:
Axel Uhl committed 2014-11-15 19:59:33 +01:00
1 parent b5a07bce10
commit b06030845b
1 file changed
+1
@@ -25,6 +25,7 @@ public abstract class AbstractSerializationTest {
}
}
}.start();
Thread.currentThread().setContextClassLoader(AbstractSerializationTest.class.getClassLoader());
ObjectInputStream dis = resolveAgainst.createObjectInputStreamResolvingAgainstThisFactory(pis);
@SuppressWarnings("unchecked")
T result = (T) dis.readObject();