commit 0700258195571767a6f38c46c7dd6a72363cbfb6
parent fd08613b6ae19a89fccd910488082c8d2a41d04c
Author: Dan Callaghan <djc@djc.id.au>
Date: Fri, 19 Mar 2010 18:07:53 +1000
Is this even the right thing to do? ugh I hate Java
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/main/java/au/com/miskinhill/rdftemplate/TemplateInterpolator.java b/src/main/java/au/com/miskinhill/rdftemplate/TemplateInterpolator.java
@@ -1,5 +1,6 @@
package au.com.miskinhill.rdftemplate;
+import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
@@ -76,6 +77,12 @@ public class TemplateInterpolator {
interpolate(inputFactory.createXMLEventReader(reader), node, writer);
} catch (XMLStreamException e) {
throw new RuntimeException(e);
+ } finally {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
}
}