diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-10-03 19:50:49 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-10-03 19:50:49 +0000 |
commit | 7a6eabd80d2c57cb8018eb4eb98fb46b765ec189 (patch) | |
tree | 8c59da2bcdfc542fce56692d9772eb0d7e4f4e8c /smcc/src/test/java/at | |
parent | 48aa94dcefe6f94628b548b631ac602dcfceb169 (diff) | |
download | mocca-7a6eabd80d2c57cb8018eb4eb98fb46b765ec189.tar.gz mocca-7a6eabd80d2c57cb8018eb4eb98fb46b765ec189.tar.bz2 mocca-7a6eabd80d2c57cb8018eb4eb98fb46b765ec189.zip |
close streams
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1146 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/test/java/at')
-rw-r--r-- | smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java | 1 | ||||
-rw-r--r-- | smcc/src/test/java/at/gv/egiz/smcc/TransparentFileInputStreamTest.java | 18 |
2 files changed, 10 insertions, 9 deletions
diff --git a/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java b/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java index 4a357cec..ec1fba2c 100644 --- a/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java +++ b/smcc/src/test/java/at/gv/egiz/smcc/ESCardTest.java @@ -447,6 +447,7 @@ public class ESCardTest extends AbstractSignatureCard { } if (offset < bytes.length) { + is.close(); throw new IOException("Could not completely read file " + file.getName()); } diff --git a/smcc/src/test/java/at/gv/egiz/smcc/TransparentFileInputStreamTest.java b/smcc/src/test/java/at/gv/egiz/smcc/TransparentFileInputStreamTest.java index 69bc69db..6964f2d2 100644 --- a/smcc/src/test/java/at/gv/egiz/smcc/TransparentFileInputStreamTest.java +++ b/smcc/src/test/java/at/gv/egiz/smcc/TransparentFileInputStreamTest.java @@ -83,7 +83,7 @@ public class TransparentFileInputStreamTest { assertEquals(0xFF & i++, b); } assertEquals(file.length, i); - + is.close(); } @Test @@ -99,7 +99,7 @@ public class TransparentFileInputStreamTest { } } assertEquals(file.length, i); - + is.close(); } @Test @@ -115,7 +115,7 @@ public class TransparentFileInputStreamTest { } } assertEquals(file_bs.length, i); - + is.close(); } @Test(expected = IOException.class) @@ -124,7 +124,7 @@ public class TransparentFileInputStreamTest { TransparentFileInputStream is = new TestTransparentFileInputStream(file); is.read(new byte[128]); is.reset(); - + is.close(); } @Test @@ -141,7 +141,7 @@ public class TransparentFileInputStreamTest { } } assertEquals(file.length, i); - + is.close(); } @Test @@ -164,7 +164,7 @@ public class TransparentFileInputStreamTest { } } assertEquals(file.length, i); - + is.close(); } @@ -181,7 +181,7 @@ public class TransparentFileInputStreamTest { assertEquals(0xFF & i + j, 0xFF & b[j]); } is.reset(); - + is.close(); } @Test @@ -196,7 +196,7 @@ public class TransparentFileInputStreamTest { for (int j = 0; j < l; j++) { assertEquals(0xFF & i + j, 0xFF & b[j]); } - + is.close(); } @Test public void testSkipBig() throws IOException { @@ -210,7 +210,7 @@ public class TransparentFileInputStreamTest { for (int j = 0; j < l; j++) { assertEquals(0xFF & i + j, 0xFF & b[j]); } - + is.close(); } } |