commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1582817 - in /commons/proper/csv/trunk/src/test/java/org/apache/commons/csv: PerformanceTest.java perf/PerformanceTest.java
Date Fri, 28 Mar 2014 16:44:41 GMT
Author: sebb
Date: Fri Mar 28 16:44:41 2014
New Revision: 1582817

URL: http://svn.apache.org/r1582817
Log:
Ensure resources are released

Modified:
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/PerformanceTest.java
    commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/PerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/PerformanceTest.java?rev=1582817&r1=1582816&r2=1582817&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/PerformanceTest.java (original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/PerformanceTest.java Fri
Mar 28 16:44:41 2014
@@ -76,6 +76,8 @@ public class PerformanceTest {
             final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz"));
             final OutputStream output = new FileOutputStream(BIG_FILE);
             IOUtils.copy(input, output);
+            input.close();
+            output.close();
             System.out.println(String.format("Decompressed test fixture %s: %,d bytes.",
BIG_FILE, BIG_FILE.length()));
         }
         final int argc = args.length;

Modified: commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java?rev=1582817&r1=1582816&r2=1582817&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java
(original)
+++ commons/proper/csv/trunk/src/test/java/org/apache/commons/csv/perf/PerformanceTest.java
Fri Mar 28 16:44:41 2014
@@ -60,6 +60,8 @@ public class PerformanceTest {
         final OutputStream output = new FileOutputStream(BIG_FILE);
         IOUtils.copy(input, output);
         System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE,
BIG_FILE.length()));
+        input.close();
+        output.close();
     }
 
     private BufferedReader getBufferedReader() throws IOException {



Mime
View raw message