commit | ffa6d3dbdee588b37cc42b2adf933bd3eb964ae0 | [log] [tgz] |
---|---|---|
author | Jan Willem Janssen <jawi@apache.org> | Wed Jan 14 21:30:38 2015 +0000 |
committer | Jan Willem Janssen <jawi@apache.org> | Wed Jan 14 21:30:38 2015 +0000 |
tree | 63bb2be8d57cea8a1665ef8c8b3fc62b79029686 | |
parent | 8ba80817ce495238ecba16d9e2ca17302a685575 [diff] |
Close JAR stream as soon as possible: - this will solve the installation problems on Windows. git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1651838 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ContentCopyingJarInputStream.java b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ContentCopyingJarInputStream.java index 8f9a689..5396cfc 100644 --- a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ContentCopyingJarInputStream.java +++ b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/ContentCopyingJarInputStream.java
@@ -70,7 +70,7 @@ public void close() throws IOException { closeCopy(); closeIndex(); - super.close(); + // Do NOT close our parent, as it is the original input stream which is not under our control... } public void closeEntry() throws IOException {
diff --git a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java index d5965f2..1c17ba4 100644 --- a/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java +++ b/deploymentadmin/deploymentadmin/src/main/java/org/apache/felix/deploymentadmin/DeploymentAdminImpl.java
@@ -221,6 +221,11 @@ catch (DeploymentException de) { throw de; } + finally { + // We're done at this point with the JAR input stream, close it here as to avoid keeping + // files open unnecessary (otherwise it fails on Windows)... + Utils.closeSilently(jarInput); + } String dpInstallBaseDirectory = PACKAGE_DIR + File.separator + dpSymbolicName;