Permalink
Browse files

Properly close test files in htmlParser unit test

  • Loading branch information...
luccioman committed Jun 21, 2017
1 parent c41b31d commit 1e2fb76720c81e10caa0e052352e29d575114e62
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/java/net/yacy/document/parser/htmlParserTest.java
@@ -56,9 +56,10 @@ public void testGetRealCharsetEncoding() {
/**
* Test of parse method, of class htmlParser.
* - test getCharset
* @throws IOException
*/
@Test
public void testParse() throws MalformedURLException, Parser.Failure, InterruptedException, FileNotFoundException {
public void testParse() throws Parser.Failure, InterruptedException, IOException {
System.out.println("htmlParser.parse");
String[] testFiles = {
@@ -89,7 +90,7 @@ public void testParse() throws MalformedURLException, Parser.Failure, Interrupte
System.out.println("detected charset = " + txt);
} finally {
if(inStream != null) {
System.out.println("Could not close input stream on file " + file);
inStream.close();
}
}

0 comments on commit 1e2fb76

Please sign in to comment.