TreeWalk: Stop using deprecated ObjectReader#release()

Change-Id: I334034a2991a07664302bc8d1f3dead85c2caffe
This commit is contained in:
Dave Borowitz 2015-03-10 15:24:47 -07:00
parent 1e694f3847
commit 421e69a4a0
1 changed files with 1 additions and 4 deletions

View File

@ -157,11 +157,8 @@ public static TreeWalk forPath(final ObjectReader reader, final String path,
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();
} }
} }