diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java index a8d797dff..748a4a38e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java @@ -556,5 +556,9 @@ public final class DfsBlockCache { hot = true; return v; } + + boolean has() { + return value != null; + } } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 1c588d2c4..7c4776ea0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -191,7 +191,7 @@ public final class DfsPackFile { */ public boolean isIndexLoaded() { DfsBlockCache.Ref idxref = index; - return idxref != null && idxref.get() != null; + return idxref != null && idxref.has(); } /** @return bytes cached in memory for this pack, excluding the index. */