Skip to content

Commit

Permalink
Fix: nullpointer on raw compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Belmonte authored and Nick Santos committed Dec 23, 2014
1 parent 749e11a commit 4c6c0fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/org/plovr/Compilation.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.google.javascript.jscomp.CheckLevel;
import com.google.javascript.jscomp.Compiler;
import com.google.javascript.jscomp.ErrorManager;
import com.google.javascript.jscomp.JSError;
import com.google.javascript.jscomp.JSModule;
import com.google.javascript.jscomp.PlovrCompilerOptions;
import com.google.javascript.jscomp.PrintStreamErrorManager;
import com.google.javascript.jscomp.Result;
import com.google.javascript.jscomp.SourceExcerptProvider;
import com.google.javascript.jscomp.SourceFile;
Expand Down Expand Up @@ -110,7 +113,9 @@ private void compileRaw(Config config) {

// Need to have a dummy Result that appears to be a success (i.e., has no
// errors or warnings).
this.result = new Compiler().getResult();
Compiler dummyCompiler = new Compiler();
dummyCompiler.setErrorManager(new PrintStreamErrorManager(System.out));
this.result = dummyCompiler.getResult();
}

/**
Expand Down

0 comments on commit 4c6c0fe

Please sign in to comment.