fix: 尝试修复测试执行时类加载的问题

This commit is contained in:
Captain.B 2021-04-21 22:52:32 +08:00 committed by 刘瑞斌
parent 7f4eb02228
commit b74fffa669
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ public final class NewDriver {
System.setProperty(JAVA_CLASS_PATH, initiaClasspath + classpath.toString());
loader = AccessController.doPrivileged(
(PrivilegedAction<DynamicClassLoader>) () ->
new DynamicClassLoader(jars.toArray(new URL[jars.size()]))
new DynamicClassLoader(jars.toArray(new URL[jars.size()]), Thread.currentThread().getContextClassLoader())
);
}