Skip to content

Commit

Permalink
get rid of the null check but check if the base path exists before ca…
Browse files Browse the repository at this point in the history
…lling #precompileTemplates
  • Loading branch information
mmurray committed Sep 5, 2012
1 parent 9f31350 commit fb859be
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -51,7 +51,14 @@ public MustacheViewProcessor(
basePath = path;
this.live = live;
this.executorService = executorService;
precompileTemplates(new File(basePath));
File baseFile = new File(basePath);
if (baseFile.exists()) {
precompileTemplates(baseFile);
}
File root = new File(".");
for (File f : root.listFiles()) {
System.out.println(f.getName());
}
}


Expand All @@ -60,9 +67,6 @@ public Writer getWriter() {
}

private void precompileTemplates(File dir) {
if (dir == null) {
return;
}
for (File f : dir.listFiles()) {
precompileTemplatesRecursively(f, "");
}
Expand Down

0 comments on commit fb859be

Please sign in to comment.