You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2011/01/05 10:42:00 UTC
svn commit: r1055379 -
/poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
Author: nick
Date: Wed Jan 5 09:42:00 2011
New Revision: 1055379
URL: http://svn.apache.org/viewvc?rev=1055379&view=rev
Log:
In NPOIFS, close the file we opened in more exception cases
Modified:
poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java?rev=1055379&r1=1055378&r2=1055379&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java Wed Jan 5 09:42:00 2011
@@ -183,6 +183,14 @@ public class NPOIFSFileSystem extends Bl
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;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org