From 8d27c480df6291307350d26d897e81886fcd4e43 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Wed, 19 Jul 2017 09:32:00 -0700 Subject: [PATCH] dfs: Fix build break caused by DfsStreamKey.of signature change Change-Id: I6c49cf42a04dd0d96cfe0751f500a51f56f0bdb8 --- .../jgit/internal/storage/dfs/DeltaBaseCacheTest.java | 3 ++- .../org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DeltaBaseCacheTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DeltaBaseCacheTest.java index ffffa9509..32d711f1f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DeltaBaseCacheTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DeltaBaseCacheTest.java @@ -63,7 +63,8 @@ public class DeltaBaseCacheTest { @Before public void setUp() { - key = DfsStreamKey.of("test.key"); + DfsRepositoryDescription repo = new DfsRepositoryDescription("test"); + key = DfsStreamKey.of(repo, "test.key"); cache = new DeltaBaseCache(SZ); rng = new TestRng(getClass().getSimpleName()); } 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 e1773eb26..f646032fd 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 @@ -178,7 +178,10 @@ public final class DfsBlockCache { blockSizeShift = Integer.numberOfTrailingZeros(blockSize); clockLock = new ReentrantLock(true /* fair */); - clockHand = new Ref<>(DfsStreamKey.of(""), -1, 0, null); //$NON-NLS-1$ + String none = ""; //$NON-NLS-1$ + clockHand = new Ref<>( + DfsStreamKey.of(new DfsRepositoryDescription(none), none), + -1, 0, null); clockHand.next = clockHand; statHit = new AtomicLong();