Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Commit 7bba60a

Browse files
committed
Ensure resources are released
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1582817 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9873b13 commit 7bba60a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/test/java/org/apache/commons/csv/PerformanceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ public static void main(final String [] args) throws Exception {
7676
final InputStream input = new GZIPInputStream(new FileInputStream("src/test/resources/perf/worldcitiespop.txt.gz"));
7777
final OutputStream output = new FileOutputStream(BIG_FILE);
7878
IOUtils.copy(input, output);
79+
input.close();
80+
output.close();
7981
System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));
8082
}
8183
final int argc = args.length;

src/test/java/org/apache/commons/csv/perf/PerformanceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public static void setUpClass() throws FileNotFoundException, IOException {
6060
final OutputStream output = new FileOutputStream(BIG_FILE);
6161
IOUtils.copy(input, output);
6262
System.out.println(String.format("Decompressed test fixture %s: %,d bytes.", BIG_FILE, BIG_FILE.length()));
63+
input.close();
64+
output.close();
6365
}
6466

6567
private BufferedReader getBufferedReader() throws IOException {

0 commit comments

Comments
 (0)