aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/poifs
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2016-12-18 22:03:31 +0000
committerAndreas Beeker <kiwiwings@apache.org>2016-12-18 22:03:31 +0000
commitb8bfe77718d26887ddccc7be4f5332aafad9e287 (patch)
treedf9350982cab011e51bf01db95def4b7a2e0fb61 /src/java/org/apache/poi/poifs
parent89699818195ddadb13f5e00961fd87c5d0046cb5 (diff)
downloadpoi-b8bfe77718d26887ddccc7be4f5332aafad9e287.tar.gz
poi-b8bfe77718d26887ddccc7be4f5332aafad9e287.zip
SonarQube fixes - close resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1774969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/poifs')
-rw-r--r--src/java/org/apache/poi/poifs/dev/POIFSLister.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/poifs/dev/POIFSLister.java b/src/java/org/apache/poi/poifs/dev/POIFSLister.java
index 357773a632..cce7080c2a 100644
--- a/src/java/org/apache/poi/poifs/dev/POIFSLister.java
+++ b/src/java/org/apache/poi/poifs/dev/POIFSLister.java
@@ -65,11 +65,13 @@ public class POIFSLister {
public static void viewFile(final String filename, boolean withSizes) throws IOException {
NPOIFSFileSystem fs = new NPOIFSFileSystem(new File(filename));
displayDirectory(fs.getRoot(), "", withSizes);
+ fs.close();
}
public static void viewFileOld(final String filename, boolean withSizes) throws IOException {
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filename));
displayDirectory(fs.getRoot(), "", withSizes);
+ fs.close();
}
public static void displayDirectory(DirectoryNode dir, String indent, boolean withSizes) {