Browse Source

Fix file handle leak in ObjectDownloadListener.onWritePossible

5c134f4d removed closing the input stream when we reached end of the
stream. This caused file handle leaks.

Bug: 540049
Change-Id: I48082b537077c7471fc160f59aa04deb99687d9b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.7
Matthias Sohn 6 years ago committed by David Pursehouse
parent
commit
89388d67f8
  1. 5
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java

5
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java

@ -129,6 +129,11 @@ public class ObjectDownloadListener implements WriteListener {
if (buffer != null) {
outChannel.write(buffer);
} else {
try {
in.close();
} catch (IOException e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
}
try {
out.close();
} finally {

Loading…
Cancel
Save