Browse Source

Remove unnecessary cast for DfsReader

Change-Id: I22aaccfc9d589750f9d1d711b655dd0fd543fa57
Signed-off-by: Zhen Chen <czhen@google.com>
stable-4.9
Zhen Chen 8 years ago
parent
commit
099dbe6ef5
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsGarbageCollector.java

@ -235,7 +235,7 @@ public class DfsGarbageCollector {
JGitText.get().supportOnlyPackIndexVersion2); JGitText.get().supportOnlyPackIndexVersion2);
startTimeMillis = SystemReader.getInstance().getCurrentTime(); startTimeMillis = SystemReader.getInstance().getCurrentTime();
ctx = (DfsReader) objdb.newReader(); ctx = objdb.newReader();
try { try {
refdb.refresh(); refdb.refresh();
objdb.clearCache(); objdb.clearCache();

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java

@ -201,7 +201,7 @@ public class DfsPackCompactor {
pm = NullProgressMonitor.INSTANCE; pm = NullProgressMonitor.INSTANCE;
DfsObjDatabase objdb = repo.getObjectDatabase(); DfsObjDatabase objdb = repo.getObjectDatabase();
try (DfsReader ctx = (DfsReader) objdb.newReader()) { try (DfsReader ctx = objdb.newReader()) {
PackConfig pc = new PackConfig(repo); PackConfig pc = new PackConfig(repo);
pc.setIndexVersion(2); pc.setIndexVersion(2);
pc.setDeltaCompress(false); pc.setDeltaCompress(false);

Loading…
Cancel
Save