summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorTomasz Zarna2011-12-06 04:44:52 (EST)
committer Tomasz Zarna2011-12-06 04:45:33 (EST)
commit2b3d48acc291f62c2c924be810e93e3a2e11615f (patch)
tree1ec52b59a3e7b1aa24d53b1eb50afc15a67a3946
parentcd958ba93cd62399da3efdd13eb9ccaa0512a452 (diff)
downloadjgit-2b3d48acc291f62c2c924be810e93e3a2e11615f.zip
jgit-2b3d48acc291f62c2c924be810e93e3a2e11615f.tar.gz
jgit-2b3d48acc291f62c2c924be810e93e3a2e11615f.tar.bz2
Stream left open in WorkingTreeIterator#filterCleanrefs/changes/45/4745/1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java6
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 8db0516..7387cb6 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) {