fix(Templates): Set ContextClassLoader for groovy and clojure (#7955)

This commit is contained in:
Yuji Yamano 2020-07-20 16:16:27 +09:00 committed by GitHub
parent ca6696c7ee
commit 25263fd473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,7 @@ public class InvokeBridge {
private Object getInstance() throws Exception {
URL[] urls = {this.artifact.toURI().toURL()};
URLClassLoader child = new URLClassLoader(urls, this.getClass().getClassLoader());
Thread.currentThread().setContextClassLoader(child);
this.clazz = Class.forName(this.className, true, child);