FELIX-3515 Now closes the stream after trying to read any extra data at the end of a ZIP file from it.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1340927 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java
index c644a42..0cf664a 100644
--- a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java
+++ b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ExplodingOutputtingInputStream.java
@@ -135,14 +135,6 @@
             if (writer != null) {
                 writer.close();
             }
-            if (input != null) {
-                try {
-                    input.close();
-                }
-                catch (IOException e) {
-                    pushException(e);
-                }
-            }
         }
         
         try {
@@ -155,6 +147,16 @@
         catch (IOException e) {
             pushException(e);
         }
+        finally {
+            if (input != null) {
+                try {
+                    input.close();
+                }
+                catch (IOException e) {
+                    pushException(e);
+                }
+            }
+        }
     }
     
     private void pushException(Exception e) {