aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2016-10-20 20:31:50 +0000
committerDominik Stadler <centic@apache.org>2016-10-20 20:31:50 +0000
commit68d0f816e968e2061d08afb9d22cb460502d2a28 (patch)
treead613d324b7ec73ec17e50a10ccbe7722fc8a518 /src/testcases
parentd76ef83dc62f185838acf7c3731fb486c8b36b1a (diff)
downloadpoi-68d0f816e968e2061d08afb9d22cb460502d2a28.tar.gz
poi-68d0f816e968e2061d08afb9d22cb460502d2a28.zip
Add some missing close() calls
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765875 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java1
-rw-r--r--src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java24
2 files changed, 14 insertions, 11 deletions
diff --git a/src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java b/src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java
index 73222ed01a..8a150323f7 100644
--- a/src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java
+++ b/src/testcases/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java
@@ -366,5 +366,6 @@ public final class TestOldExcelExtractor {
} catch (EncryptedDocumentException e) {
assertTrue("correct exception thrown", true);
}
+ ex.close();
}
}
diff --git a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
index 6ac37eacba..eeb43b4d27 100644
--- a/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
+++ b/src/testcases/org/apache/poi/poifs/macros/TestVBAMacroReader.java
@@ -17,11 +17,12 @@
package org.apache.poi.poifs.macros;
-import static org.apache.poi.POITestCase.assertContains;
-import static org.apache.poi.POITestCase.skipTest;
-import static org.apache.poi.POITestCase.testPassesNow;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
+import org.apache.poi.POIDataSamples;
+import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
+import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.StringUtil;
+import org.junit.Ignore;
+import org.junit.Test;
import java.io.File;
import java.io.FileInputStream;
@@ -31,12 +32,9 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import org.apache.poi.POIDataSamples;
-import org.apache.poi.poifs.filesystem.NPOIFSFileSystem;
-import org.apache.poi.util.IOUtils;
-import org.apache.poi.util.StringUtil;
-import org.junit.Ignore;
-import org.junit.Test;
+import static org.apache.poi.POITestCase.assertContains;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
public class TestVBAMacroReader {
private static final Map<POIDataSamples, String> expectedMacroContents;
@@ -255,6 +253,7 @@ public class TestVBAMacroReader {
Map<String, String> macros = r.readMacros();
assertNotNull(macros.get("Module20"));
assertContains(macros.get("Module20"), "here start of superscripting");
+ r.close();
}
@Test
@@ -264,6 +263,7 @@ public class TestVBAMacroReader {
Map<String, String> macros = r.readMacros();
assertNotNull(macros.get("Sheet4"));
assertContains(macros.get("Sheet4"), "intentional constituent");
+ r.close();
}
@Test
@@ -273,6 +273,7 @@ public class TestVBAMacroReader {
Map<String, String> macros = r.readMacros();
assertNotNull(macros.get("NewMacros"));
assertContains(macros.get("NewMacros"), "' dirty");
+ r.close();
}
@Test
@@ -283,5 +284,6 @@ public class TestVBAMacroReader {
Map<String, String> macros = r.readMacros();
assertNotNull(macros.get("Module1"));
assertContains(macros.get("Module1"), "9/8/2004");
+ r.close();
}
}