You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by db...@apache.org on 2008/04/02 05:38:43 UTC
svn commit: r643697 -
/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
Author: dbrosius
Date: Tue Apr 1 20:38:41 2008
New Revision: 643697
URL: http://svn.apache.org/viewvc?rev=643697&view=rev
Log:
don't throw exceptions on close from a finally block
Modified:
jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java?rev=643697&r1=643696&r2=643697&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java Tue Apr 1 20:38:41 2008
@@ -23,6 +23,7 @@
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
+
import org.apache.bcel.Constants;
/**
@@ -162,12 +163,16 @@
} finally {
// Read everything of interest, so close the file
if (fileOwned) {
- if (file != null) {
- file.close();
- }
- if (zip != null) {
- zip.close();
- }
+ try {
+ if (file != null) {
+ file.close();
+ }
+ if (zip != null) {
+ zip.close();
+ }
+ } catch (IOException ioe) {
+ //ignore close exceptions
+ }
}
}
// Return the information we have gathered in a new object
---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org