We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b65409 commit 85f5a9cCopy full SHA for 85f5a9c
contrib/ant/src/java/org/apache/lucene/ant/HtmlDocument.java
@@ -60,8 +60,13 @@ public HtmlDocument(File file) throws IOException {
60
Tidy tidy = new Tidy();
61
tidy.setQuiet(true);
62
tidy.setShowWarnings(false);
63
- org.w3c.dom.Document root =
64
- tidy.parseDOM(new FileInputStream(file), null);
+ org.w3c.dom.Document root = null;
+ InputStream is = new FileInputStream(file);
65
+ try {
66
+ root = tidy.parseDOM(is, null);
67
+ } finally {
68
+ is.close();
69
+ }
70
rawDoc = root.getDocumentElement();
71
}
72
0 commit comments