Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #853 - repair classloader for spring #870

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
velo marked this conversation as resolved.
Show resolved Hide resolved
import javax.tools.JavaCompiler;
import javax.tools.SimpleJavaFileObject;
import javax.tools.StandardLocation;
Expand Down Expand Up @@ -50,7 +47,8 @@ public JDKEvaluatorFactory(ClassLoader parent, JavaCompiler compiler) {
this.fileManager =
new MemFileManager(parent, compiler.getStandardFileManager(null, null, null));
this.compiler = compiler;
this.classpath = SimpleCompiler.getClassPath(parent);
this.classpath = Optional.of(SimpleCompiler.getClassPath(parent)).filter(s -> !s.isEmpty())
.orElseGet(() -> SimpleCompiler.getClassPath(compiler.getClass().getClassLoader()));
this.loader = fileManager.getClassLoader(StandardLocation.CLASS_OUTPUT);
this.compilationOptions = Arrays.asList("-classpath", classpath, "-g:none");
}
Expand Down