Use Thread ContextClassLoader in ConfigurableObjectInputStream
Issue: SWF-1690
This commit is contained in:
@@ -248,7 +248,12 @@ public class SerializedFlowExecutionSnapshot extends FlowExecutionSnapshot imple
|
||||
|
||||
public ConfigurableObjectInputStream(InputStream in, ClassLoader classLoader) throws IOException {
|
||||
super(in);
|
||||
this.classLoader = classLoader;
|
||||
this.classLoader = initClassLoader(classLoader);
|
||||
}
|
||||
|
||||
private static ClassLoader initClassLoader(ClassLoader defaultClassLoader) {
|
||||
ClassLoader result = Thread.currentThread().getContextClassLoader();
|
||||
return result != null ? result : defaultClassLoader;
|
||||
}
|
||||
|
||||
protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException {
|
||||
|
||||
Reference in New Issue
Block a user