diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java index e9ec7e718..55f9cc212 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java @@ -235,7 +235,7 @@ public class DfsGarbageCollector { JGitText.get().supportOnlyPackIndexVersion2); startTimeMillis = SystemReader.getInstance().getCurrentTime(); - ctx = (DfsReader) objdb.newReader(); + ctx = objdb.newReader(); try { refdb.refresh(); objdb.clearCache(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java index 0a29ac515..f7c87a4e7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java @@ -201,7 +201,7 @@ public class DfsPackCompactor { pm = NullProgressMonitor.INSTANCE; DfsObjDatabase objdb = repo.getObjectDatabase(); - try (DfsReader ctx = (DfsReader) objdb.newReader()) { + try (DfsReader ctx = objdb.newReader()) { PackConfig pc = new PackConfig(repo); pc.setIndexVersion(2); pc.setDeltaCompress(false);