Skip to content
Browse files

Sync with trunk for NPOIFS

git-svn-id: https://svn.apache.org/repos/asf/poi/branches/NIO_32_BRANCH@1055380 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent c1e2c16 commit 8571f9e70ce438b3cfa11ae81748576f2c2e400a @Gagravarr Gagravarr committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
View
8 src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
@@ -183,6 +183,14 @@ private NPOIFSFileSystem(FileChannel channel, boolean closeChannelOnError)
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;
}
}

0 comments on commit 8571f9e

Please sign in to comment.
Something went wrong with that request. Please try again.