diff options
author | Dave Borowitz <dborowitz@google.com> | 2015-03-10 15:24:47 -0700 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2015-03-10 16:27:22 -0700 |
commit | 421e69a4a02c0b8aa82ca7421af10246f22c389a (patch) | |
tree | 6306a8f8a56917edeec243d76bb9c2201be09f77 /org.eclipse.jgit/src/org/eclipse/jgit | |
parent | 1e694f3847e1f379a1c7998ef3b0c890fb04a854 (diff) | |
download | jgit-421e69a4a02c0b8aa82ca7421af10246f22c389a.tar.gz jgit-421e69a4a02c0b8aa82ca7421af10246f22c389a.zip |
TreeWalk: Stop using deprecated ObjectReader#release()
Change-Id: I334034a2991a07664302bc8d1f3dead85c2caffe
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java index 577c9e303d..3ecef453e6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java @@ -157,11 +157,8 @@ public class TreeWalk implements AutoCloseable { public static TreeWalk forPath(final Repository db, final String path, final AnyObjectId... trees) throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException { - ObjectReader reader = db.newObjectReader(); - try { + try (ObjectReader reader = db.newObjectReader()) { return forPath(reader, path, trees); - } finally { - reader.release(); } } |