diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2022-06-07 11:37:25 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-06-07 11:37:25 +0200 |
commit | 7996a2e7b4a35bce24fd93db67d7717c0aac02fb (patch) | |
tree | 00f1ac04bf691197e8c33df535839840b628ce1d | |
parent | 8137e5e7462d7848ffcf570d4f1b42d278e1ec6e (diff) | |
parent | 4e2651e53890c739dd522de6b1d77e428e2cde88 (diff) | |
download | jgit-7996a2e7b4a35bce24fd93db67d7717c0aac02fb.tar.gz jgit-7996a2e7b4a35bce24fd93db67d7717c0aac02fb.zip |
Merge branch 'stable-6.2'
* stable-6.2:
Update DEPENDENCIES for 6.2.0 to be released with 2022-06
Update orbit to R20220531185310 for 2022-06
Prepare 6.2.0-SNAPSHOT builds
Fix connection leak for smart http connections
JGit v6.2.0.202206011217-rc1
Change-Id: Ia11744588952f8627ea37421821759675aa79688
19 files changed, 51 insertions, 39 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES index 59c456e1f2..be7ab17cb4 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -5,7 +5,7 @@ maven/mavencentral/com.jcraft/jsch/0.1.55, BSD-3-Clause, approved, CQ19435 maven/mavencentral/com.jcraft/jzlib/1.1.3, BSD-2-Clause, approved, CQ6218 maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0 AND BSD-3-Clause, approved, CQ15971 maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ10162 -maven/mavencentral/javax.servlet/javax.servlet-api/4.0.0, , approved, CQ16125 +maven/mavencentral/javax.servlet/javax.servlet-api/4.0.0, (CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0) AND Apache-2.0, approved, CQ16125 maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, approved, clearlydefined maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, approved, clearlydefined diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index 909b32a73d..3d4f2378d1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.17" sequenceNumber="1653430139"> +<target name="jgit-4.17" sequenceNumber="1654550635"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index c78908b391..9c824c5fd4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index 9a19f4b67c..603fefbadf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.18" sequenceNumber="1653430139"> +<target name="jgit-4.18" sequenceNumber="1654550635"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index bb9411069a..1dcdd9bebb 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index caaa7055be..cc418b1c8a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.19-staging" sequenceNumber="1653430136"> +<target name="jgit-4.19-staging" sequenceNumber="1654550632"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index 86d5550580..806851c6e2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 52c6e0dd84..efcb591efa 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.20" sequenceNumber="1653430139"> +<target name="jgit-4.20" sequenceNumber="1654550634"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index 55fc7fbefc..a3ea58300e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index 67b96e14c6..85ed31f441 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.21" sequenceNumber="1653430139"> +<target name="jgit-4.21" sequenceNumber="1654550635"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index 10acb68ec3..0808601826 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target index afb52ccb56..e7b5a31992 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.22" sequenceNumber="1653430138"> +<target name="jgit-4.22" sequenceNumber="1654550634"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd index 9b2533b45f..5697574d3f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.22.tpd @@ -1,7 +1,7 @@ target "jgit-4.22" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2021-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target index b233f3d184..3c18e4b75c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.23" sequenceNumber="1653430138"> +<target name="jgit-4.23" sequenceNumber="1654550634"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd index 69c9a118dd..7fd421a882 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.23.tpd @@ -1,7 +1,7 @@ target "jgit-4.23" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/releases/2022-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target index 1a48702e23..b622b4e91e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.24" sequenceNumber="1653430121"> +<target name="jgit-4.24" sequenceNumber="1654550621"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="jakarta.servlet-api" version="4.0.0"/> @@ -87,7 +87,7 @@ <unit id="org.slf4j.binding.simple.source" version="1.7.30.v20200204-2150"/> <unit id="org.tukaani.xz" version="1.9.0.v20210624-1259"/> <unit id="org.tukaani.xz.source" version="1.9.0.v20210624-1259"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd index 9b8e6f8413..e81eec9eb6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.24.tpd @@ -1,7 +1,7 @@ target "jgit-4.24" with source configurePhase include "projects/jetty-10.0.x.tpd" -include "orbit/staging-2022-06.tpd" +include "orbit/R20220531185310-2022-06.tpd" location "https://download.eclipse.org/staging/2022-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20220531185310-2022-06.tpd index 41d534abc0..3c74497c21 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2022-06.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20220531185310-2022-06.tpd @@ -1,7 +1,7 @@ -target "staging-2022-06" with source configurePhase +target "R20220531185310-2022-06" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/S20220517184036/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20220531185310/repository" { com.google.gson [2.8.9.v20220111-1409,2.8.9.v20220111-1409] com.google.gson.source [2.8.9.v20220111-1409,2.8.9.v20220111-1409] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java index 0710d3fdfb..405373a0f9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -1540,14 +1540,19 @@ public class TransportHttp extends HttpTransport implements WalkTransport, } @Override - protected void doFetch(final ProgressMonitor monitor, - final Collection<Ref> want, final Set<ObjectId> have, - final OutputStream outputStream) throws TransportException { - try { - svc = new MultiRequestService(SVC_UPLOAD_PACK, - getProtocolVersion()); - init(svc.getInputStream(), svc.getOutputStream()); + protected void doFetch(ProgressMonitor monitor, Collection<Ref> want, + Set<ObjectId> have, OutputStream outputStream) + throws TransportException { + svc = new MultiRequestService(SVC_UPLOAD_PACK, + getProtocolVersion()); + try (InputStream svcIn = svc.getInputStream(); + OutputStream svcOut = svc.getOutputStream()) { + init(svcIn, svcOut); super.doFetch(monitor, want, have, outputStream); + } catch (TransportException e) { + throw e; + } catch (IOException e) { + throw new TransportException(e.getMessage(), e); } finally { svc = null; } @@ -1571,13 +1576,20 @@ public class TransportHttp extends HttpTransport implements WalkTransport, } @Override - protected void doPush(final ProgressMonitor monitor, - final Map<String, RemoteRefUpdate> refUpdates, + protected void doPush(ProgressMonitor monitor, + Map<String, RemoteRefUpdate> refUpdates, OutputStream outputStream) throws TransportException { - final Service svc = new MultiRequestService(SVC_RECEIVE_PACK, + Service svc = new MultiRequestService(SVC_RECEIVE_PACK, getProtocolVersion()); - init(svc.getInputStream(), svc.getOutputStream()); - super.doPush(monitor, refUpdates, outputStream); + try (InputStream svcIn = svc.getInputStream(); + OutputStream svcOut = svc.getOutputStream()) { + init(svcIn, svcOut); + super.doPush(monitor, refUpdates, outputStream); + } catch (TransportException e) { + throw e; + } catch (IOException e) { + throw new TransportException(e.getMessage(), e); + } } } |