Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Commit

Permalink
Fix java compiler util issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mapingo committed Apr 13, 2018
1 parent dca3445 commit fc2c74d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ public class JavaCompilerUtil {

private final File codegenOutputDir;
private final File compilationOutputDir;
private final JavaCompiler compiler;

public JavaCompilerUtil(final File codegenOutputDir, final File compilationOutputDir) {
this.codegenOutputDir = codegenOutputDir;
this.compilationOutputDir = compilationOutputDir;
this.compiler = ToolProvider.getSystemJavaCompiler();
}

/**
Expand Down Expand Up @@ -177,7 +179,6 @@ private Set<String> getClassNames(final Reflections reflections) {

private void compile() {

final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
final DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();

try (final StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, Locale.getDefault(), null)) {
Expand Down

0 comments on commit fc2c74d

Please sign in to comment.