summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-10-20 01:23:17 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-10-20 01:23:27 +0200
commit976a8e369d0c53b6c3f794dc3e9738cc0d18bdda (patch)
tree8733a97a260e065705146a38dfa451c6406d27e4
parenteb41de5b2534f07f1164bbb7ad1a19b225b55e7f (diff)
parent019f1b2d4c8f799c1bc1332ba94835ae10543339 (diff)
downloadjgit-976a8e369d0c53b6c3f794dc3e9738cc0d18bdda.tar.gz
jgit-976a8e369d0c53b6c3f794dc3e9738cc0d18bdda.zip
Merge branch 'stable-4.10' into stable-4.11
* stable-4.10: Prepare 4.9.8-SNAPSHOT builds JGit v4.9.7.201810191756-r Update API problem filter Prepare 4.7.7-SNAPSHOT builds JGit v4.7.6.201810191618-r Update API problem filter Fix file handle leak in ObjectDownloadListener.onWritePossible Replace Findbugs with Spotbugs in org.eclipse.jgit/pom.xml Replace FindBugs with SpotBugs Prepare 4.4.2-SNAPSHOT builds JGit v4.0.3.201509231615-r Change-Id: I5698fde41417c4ce9e813c683c84978f303b76fe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
index 62601915ee..06a7726955 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
@@ -124,7 +124,7 @@ public class ObjectDownloadListener implements WriteListener {
} else {
buffer.flip();
}
- } catch(Throwable t) {
+ } catch (Throwable t) {
LOG.log(Level.SEVERE, t.getMessage(), t);
buffer = null;
} finally {
@@ -132,6 +132,11 @@ public class ObjectDownloadListener implements WriteListener {
outChannel.write(buffer);
} else {
try {
+ in.close();
+ } catch (IOException e) {
+ LOG.log(Level.SEVERE, e.getMessage(), e);
+ }
+ try {
out.close();
} finally {
context.complete();