diff options
author | Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> | 2011-12-06 10:44:52 +0100 |
---|---|---|
committer | Tomasz Zarna <Tomasz.Zarna@pl.ibm.com> | 2011-12-06 10:45:33 +0100 |
commit | 2b3d48acc291f62c2c924be810e93e3a2e11615f (patch) | |
tree | 1ec52b59a3e7b1aa24d53b1eb50afc15a67a3946 | |
parent | cd958ba93cd62399da3efdd13eb9ccaa0512a452 (diff) | |
download | jgit-2b3d48acc291f62c2c924be810e93e3a2e11615f.tar.gz jgit-2b3d48acc291f62c2c924be810e93e3a2e11615f.zip |
Stream left open in WorkingTreeIterator#filterClean
Change-Id: I17c2709f2613536c02c9ea2977d936b87029ac0d
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 8db0516de6..7387cb649c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -395,7 +395,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { private ByteBuffer filterClean(byte[] src, int n) throws IOException { InputStream in = new ByteArrayInputStream(src); - return IO.readWholeStream(filterClean(in), n); + try { + return IO.readWholeStream(filterClean(in), n); + } finally { + safeClose(in); + } } private InputStream filterClean(InputStream in) { |