jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r643697 - /jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/ClassParser.java
Date Wed, 02 Apr 2008 03:38:43 GMT
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


Mime
View raw message