Browse Source

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
stable-3.6
Shawn Pearce 10 years ago committed by Shawn Pearce
parent
commit
6814728a82
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

2
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java vendored

@ -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();
}

Loading…
Cancel
Save