diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java index ab4579009..b3dc267b9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java @@ -291,13 +291,13 @@ public class FileTreeIteratorTest extends RepositoryTestCase { // Modify previously committed DirCacheEntry and write it back to disk DirCacheEntry dce = db.readDirCache().getEntry("symlink"); dce.setFileMode(FileMode.SYMLINK); - DirCacheCheckout.checkoutEntry(db, f, dce); + ObjectReader objectReader = db.newObjectReader(); + DirCacheCheckout.checkoutEntry(db, f, dce, objectReader); FileTreeIterator fti = new FileTreeIterator(trash, db.getFS(), db .getConfig().get(WorkingTreeOptions.KEY)); while (!fti.getEntryPathString().equals("symlink")) fti.next(1); - ObjectReader objectReader = db.newObjectReader(); assertFalse(fti.isModified(dce, false, objectReader)); objectReader.release(); } 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 9f340c119..a9b36b0fb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1163,7 +1163,9 @@ public class DirCacheCheckout { * @param entry * the entry containing new mode and content * @throws IOException + * @deprecated Use the overloaded form that accepts {@link ObjectReader}. */ + @Deprecated public static void checkoutEntry(final Repository repository, File f, DirCacheEntry entry) throws IOException { ObjectReader or = repository.newObjectReader();