summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <sop@google.com>2014-11-24 11:38:09 -0800
committerShawn Pearce <spearce@spearce.org>2014-11-27 13:32:20 -0800
commit6814728a821144617e5fe81d54bad8df12ce2586 (patch)
treec17d313677aafacbbd98b212cc3b30be0e3198fb /org.eclipse.jgit
parentb2f0fd03d81cbcec741f08deddd7531613e0ddd1 (diff)
downloadjgit-6814728a821144617e5fe81d54bad8df12ce2586.tar.gz
jgit-6814728a821144617e5fe81d54bad8df12ce2586.zip
DirCacheCheckout: create only one ObjectReader
This deprecated method accidentally creates two ObjectReader instances. Use the instance created one line above that is correctly released in the finally block. Change-Id: Ic57d041674611802a9384d8fa1d292e821055019
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index a9b36b0fbb..c52833127c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -1170,7 +1170,7 @@ public class DirCacheCheckout {
DirCacheEntry entry) throws IOException {
ObjectReader or = repository.newObjectReader();
try {
- checkoutEntry(repository, f, entry, repository.newObjectReader());
+ checkoutEntry(repository, f, entry, or);
} finally {
or.release();
}