mirror of https://github.com/apache/lucene.git
SOLR-5914: Fix missing close on Reader
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1582549 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e01f41cc16
commit
61c6ee3ce8
|
@ -58,12 +58,14 @@ public class ContentStreamTest extends SolrTestCaseJ4
|
|||
FileInputStream fis = new FileInputStream(file);
|
||||
InputStreamReader isr = new InputStreamReader(
|
||||
new FileInputStream(file), "UTF-8");
|
||||
Reader r = stream.getReader();
|
||||
try {
|
||||
assertEquals(file.length(), stream.getSize().intValue());
|
||||
assertTrue(IOUtils.contentEquals(fis, s));
|
||||
assertTrue(IOUtils.contentEquals(isr, stream.getReader()));
|
||||
assertTrue(IOUtils.contentEquals(isr, r));
|
||||
} finally {
|
||||
s.close();
|
||||
r.close();
|
||||
isr.close();
|
||||
fis.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue