You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ma...@apache.org on 2012/05/21 10:24:04 UTC

svn commit: r1340927 - /felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java

Author: marrs
Date: Mon May 21 08:24:03 2012
New Revision: 1340927

URL: http://svn.apache.org/viewvc?rev=1340927&view=rev
Log:
FELIX-3515 Now closes the stream after trying to read any extra data at the end of a ZIP file from it.

Modified:
    felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java

Modified: felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java
URL: http://svn.apache.org/viewvc/felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java?rev=1340927&r1=1340926&r2=1340927&view=diff
==============================================================================
--- felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java (original)
+++ felix/trunk/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java Mon May 21 08:24:03 2012
@@ -135,14 +135,6 @@ class ExplodingOutputtingInputStream ext
             if (writer != null) {
                 writer.close();
             }
-            if (input != null) {
-                try {
-                    input.close();
-                }
-                catch (IOException e) {
-                    pushException(e);
-                }
-            }
         }
         
         try {
@@ -155,6 +147,16 @@ class ExplodingOutputtingInputStream ext
         catch (IOException e) {
             pushException(e);
         }
+        finally {
+            if (input != null) {
+                try {
+                    input.close();
+                }
+                catch (IOException e) {
+                    pushException(e);
+                }
+            }
+        }
     }
     
     private void pushException(Exception e) {