Browse Source

TreeWalk: Stop using deprecated ObjectReader#release()

Change-Id: I334034a2991a07664302bc8d1f3dead85c2caffe
stable-4.0
Dave Borowitz 10 years ago
parent
commit
421e69a4a0
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java

5
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, public static TreeWalk forPath(final Repository db, final String path,
final AnyObjectId... trees) throws MissingObjectException, final AnyObjectId... trees) throws MissingObjectException,
IncorrectObjectTypeException, CorruptObjectException, IOException { IncorrectObjectTypeException, CorruptObjectException, IOException {
ObjectReader reader = db.newObjectReader(); try (ObjectReader reader = db.newObjectReader()) {
try {
return forPath(reader, path, trees); return forPath(reader, path, trees);
} finally {
reader.release();
} }
} }

Loading…
Cancel
Save