Skip to content

Commit

Permalink
Merge pull request #37 from bolinfest/nick-npe
Browse files Browse the repository at this point in the history
Fix: nullpointer on raw compilation
  • Loading branch information
nicks committed Dec 23, 2014
2 parents 749e11a + 4c6c0fe commit 39d05e7
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 39d05e7

Please sign in to comment.