summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2018-10-20 00:16:21 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-10-20 00:16:21 +0200
commit019f1b2d4c8f799c1bc1332ba94835ae10543339 (patch)
treee702dd14e73892399a8a1a45b29ad1c651c50fb7
parent8b239e5b75fc4bb137b2845b607f5cc1bb4cc29b (diff)
parent7ae004509cf007b1750050adb5a3f9a46cc48b6b (diff)
downloadjgit-019f1b2d4c8f799c1bc1332ba94835ae10543339.tar.gz
jgit-019f1b2d4c8f799c1bc1332ba94835ae10543339.zip
Merge branch 'stable-4.9' into stable-4.10
* stable-4.9: 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: I6f07ea02491ba3a32f30ee2408e1153241cc8a07 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();