commit b9b2075a2efc77808ac6b5256c5a8cd8d44ef302
parent c888c5f681d4543cbe2bf969c5476a5c3b94f973
Author: Dan Callaghan <djc@djc.id.au>
Date: Sun, 16 May 2010 16:33:27 +1000
merged
--HG--
rename : src/main/java/au/com/miskinhill/rdftemplate/TemplateInterpolator.java => src/main/java/au/id/djc/rdftemplate/TemplateInterpolator.java
Diffstat:
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/.hgtags b/.hgtags
@@ -1 +1,2 @@
8a461fe87fe3bee4cd3135047edc9cd52c3f70c5 rdftemplate-1.0
+7c686d1383b7120b2a0c78aafa31e54d657ca4b4 rdftemplate-1.0.1
diff --git a/src/main/java/au/id/djc/rdftemplate/TemplateInterpolator.java b/src/main/java/au/id/djc/rdftemplate/TemplateInterpolator.java
@@ -1,6 +1,7 @@
package au.id.djc.rdftemplate;
import java.io.InputStream;
+import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
@@ -78,6 +79,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);
+ }
}
}