diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2016-12-18 22:03:31 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2016-12-18 22:03:31 +0000 |
commit | b8bfe77718d26887ddccc7be4f5332aafad9e287 (patch) | |
tree | df9350982cab011e51bf01db95def4b7a2e0fb61 /src/java/org/apache/poi/poifs | |
parent | 89699818195ddadb13f5e00961fd87c5d0046cb5 (diff) | |
download | poi-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.java | 2 |
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) { |