Determine parent ClassLoader in CLI in a more robust manner

Closes gh-11745
pull/11785/merge
Andy Wilkinson 7 years ago
parent adfb6dc128
commit cffafe31ba

@ -176,7 +176,7 @@ public class ExtendedGroovyClassLoader extends GroovyClassLoader {
DefaultScopeParentClassLoader(ClassLoader parent) { DefaultScopeParentClassLoader(ClassLoader parent) {
super(parent); super(parent);
this.groovyOnlyClassLoader = new URLClassLoader(getGroovyJars(parent), this.groovyOnlyClassLoader = new URLClassLoader(getGroovyJars(parent),
parent.getParent().getParent()); getClass().getClassLoader().getParent());
} }
private URL[] getGroovyJars(ClassLoader parent) { private URL[] getGroovyJars(ClassLoader parent) {

Loading…
Cancel
Save