]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/output/template/Template.java
chg: manage more resources explicitly
[gigi.git] / src / club / wpia / gigi / output / template / Template.java
index 454c0c5846d4b35df39bf62e44fa8566bc0a7840..ad53ac2ed4492ccbff4ec54598896d328fdc41b7 100644 (file)
@@ -237,7 +237,7 @@ public class Template implements Outputable {
     protected void tryReload() {
         if (source != null && lastLoaded < source.lastModified()) {
             System.out.println("Reloading template.... " + source);
-            try (InputStreamReader r = new InputStreamReader(new FileInputStream(source), "UTF-8")) {
+            try (FileInputStream fis = new FileInputStream(source); InputStreamReader r = new InputStreamReader(fis, "UTF-8")) {
                 data = parse(r).getBlock(null);
                 r.close();
                 lastLoaded = source.lastModified() + 1000;
@@ -322,7 +322,7 @@ public class Template implements Outputable {
         public void merge(ParseContext other) {
             line = other.line;
             column = other.column;
-            parseException.append(other.parseException);
+            append(other);
         }
 
         public void append(ParseContext other) {