summaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2011-01-05 09:42:30 +0000
committerNick Burch <nick@apache.org>2011-01-05 09:42:30 +0000
commit6a0f8c54522a0167daeb482639d90164c5b9b5cc (patch)
tree4f66e4a40ef82fb3f24d635da9fc94a1b49a9bb9 /src/java/org/apache
parent5ce8c4e6b1e14b5b843663470acae854a0501253 (diff)
downloadpoi-NIO_32_BRANCH.tar.gz
poi-NIO_32_BRANCH.zip
Sync with trunk for NPOIFSNIO_32_BRANCH
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/NIO_32_BRANCH@1055380 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
index 8a7b683315..58d77be69a 100644
--- a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
+++ b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
@@ -183,6 +183,14 @@ public class NPOIFSFileSystem extends BlockStore
channel.close();
}
throw e;
+ } catch(RuntimeException e) {
+ // Comes from Iterators etc.
+ // TODO Decide if we can handle these better whilst
+ // still sticking to the iterator contract
+ if(closeChannelOnError) {
+ channel.close();
+ }
+ throw e;
}
}