lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1582549 - /lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
Date Thu, 27 Mar 2014 23:49:03 GMT
Author: uschindler
Date: Thu Mar 27 23:49:03 2014
New Revision: 1582549

URL: http://svn.apache.org/r1582549
Log:
SOLR-5914: Fix missing close on Reader

Modified:
    lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java

Modified: lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java?rev=1582549&r1=1582548&r2=1582549&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
Thu Mar 27 23:49:03 2014
@@ -58,12 +58,14 @@ public class ContentStreamTest extends S
     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();
     }



Mime
View raw message