diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/EvictionTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/EvictionTest.java index e91a9fd495..f1d57a4aa3 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/EvictionTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/EvictionTest.java @@ -834,7 +834,7 @@ public void maximumSize_decrease_negative(Cache cache, } @Test(dataProvider = "caches") - @CacheSpec(maximumSize = Maximum.FULL, removalListener = { Listener.DISABLED, Listener.REJECTING }) + @CacheSpec(maximumSize = Maximum.FULL, removalListener = {Listener.DISABLED, Listener.REJECTING}) public void maximumSize_increase(Cache cache, CacheContext context, Eviction eviction) { eviction.setMaximum(2 * context.maximumWeightOrSize()); diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ExpireAfterVarTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ExpireAfterVarTest.java index aa3372ff09..51192cb73e 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ExpireAfterVarTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ExpireAfterVarTest.java @@ -1031,7 +1031,8 @@ public void compute_error(Cache cache, } @Test(dataProvider = "caches") - @CacheSpec(expiry = CacheExpiry.MOCKITO, removalListener = {Listener.DISABLED, Listener.REJECTING}) + @CacheSpec(expiry = CacheExpiry.MOCKITO, + removalListener = {Listener.DISABLED, Listener.REJECTING}) public void compute_absent_nullValue(Cache cache, CacheContext context, VarExpiration expireAfterVar) { Int result = expireAfterVar.compute(context.absentKey(), diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LoadingCacheTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LoadingCacheTest.java index f100ef3773..fe8ba7bb4b 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LoadingCacheTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LoadingCacheTest.java @@ -560,9 +560,8 @@ public void refresh_absent_null(LoadingCache cache, CacheContext conte @CheckNoEvictions @Test(dataProvider = "caches") - @CacheSpec( - maximumSize = Maximum.UNREACHABLE, - removalListener = { Listener.DISABLED, Listener.REJECTING }, population = Population.SINGLETON) + @CacheSpec(population = Population.SINGLETON, maximumSize = Maximum.UNREACHABLE, + removalListener = { Listener.DISABLED, Listener.REJECTING }) public void refresh_absent(LoadingCache cache, CacheContext context) { Int key = context.absentKey(); var future = cache.refresh(key); diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LocalCacheSubject.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LocalCacheSubject.java index e27bbb59d1..820310f4d4 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LocalCacheSubject.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LocalCacheSubject.java @@ -251,7 +251,8 @@ private void checkEvictionDeque(BoundedLocalCache bounded) { var deques = new ImmutableTable.Builder>>() .put("window", bounded.windowWeightedSize(), bounded.accessOrderWindowDeque()) .put("probation", mainProbation, bounded.accessOrderProbationDeque()) - .put("protected", bounded.mainProtectedWeightedSize(), bounded.accessOrderProtectedDeque()) + .put("protected", bounded.mainProtectedWeightedSize(), + bounded.accessOrderProtectedDeque()) .build(); checkLinks(bounded, deques); check("accessOrderWindowDeque()").about(deque()) diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ReserializableSubject.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ReserializableSubject.java index cf8d42675c..746f3f963b 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ReserializableSubject.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/ReserializableSubject.java @@ -138,7 +138,8 @@ private void checkBoundedLocalCache( checkEvictionListener(original, copy); } - private void checkRefreshAfterWrite(BoundedLocalCache original, BoundedLocalCache copy) { + private void checkRefreshAfterWrite( + BoundedLocalCache original, BoundedLocalCache copy) { check("refreshAfterWrite()").that(copy.refreshAfterWrite()) .isEqualTo(original.refreshAfterWrite()); if (original.refreshAfterWrite()) { @@ -147,7 +148,8 @@ private void checkRefreshAfterWrite(BoundedLocalCache original, BoundedLoc } } - private void checkEviction(BoundedLocalCache original, BoundedLocalCache copy) { + private void checkEviction( + BoundedLocalCache original, BoundedLocalCache copy) { check("evicts()").that(copy.evicts()).isEqualTo(original.evicts()); check("weigher()").that(unwrapWeigher(copy.weigher)) .isInstanceOf(unwrapWeigher(original.weigher).getClass()); @@ -156,7 +158,8 @@ private void checkEviction(BoundedLocalCache original, BoundedLocalCache original, BoundedLocalCache copy) { + private void checkExpiresAfterAccess( + BoundedLocalCache original, BoundedLocalCache copy) { check("expiresAfterAccess()").that(copy.expiresAfterAccess()) .isEqualTo(original.expiresAfterAccess()); if (original.expiresAfterAccess()) { @@ -165,7 +168,8 @@ private void checkExpiresAfterAccess(BoundedLocalCache original, BoundedLo } } - private void checkExpiresAfterWrite(BoundedLocalCache original, BoundedLocalCache copy) { + private void checkExpiresAfterWrite( + BoundedLocalCache original, BoundedLocalCache copy) { check("expiresAfterWrite()").that(copy.expiresAfterWrite()) .isEqualTo(original.expiresAfterWrite()); if (original.expiresAfterWrite()) { @@ -174,7 +178,8 @@ private void checkExpiresAfterWrite(BoundedLocalCache original, BoundedLoc } } - private void checkExpiresVariable(BoundedLocalCache original, BoundedLocalCache copy) { + private void checkExpiresVariable( + BoundedLocalCache original, BoundedLocalCache copy) { check("expiresVariable()").that(copy.expiresVariable()) .isEqualTo(original.expiresVariable()); if (original.expiresVariable()) { diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/Stresser.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/Stresser.java index 87a0079192..7858956ac7 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/Stresser.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/Stresser.java @@ -133,7 +133,8 @@ private void status() { local.readBuffer.size(), pendingWrites); System.out.printf(US, "Drain status = %s (%s)%n", STATUS[drainStatus], drainStatus); System.out.printf(US, "Evictions = %,d%n", cache.stats().evictionCount()); - System.out.printf(US, "Size = %,d (max: %,d)%n", local.data.mappingCount(), workload.maxEntries); + System.out.printf(US, "Size = %,d (max: %,d)%n", + local.data.mappingCount(), workload.maxEntries); System.out.printf(US, "Lock = [%s%n", StringUtils.substringAfter( local.evictionLock.toString(), "[")); System.out.printf(US, "Pending reloads = %,d%n", local.refreshes.size()); diff --git a/examples/coalescing-bulkloader/src/main/java/com/github/benmanes/caffeine/examples/coalescing/bulkloader/CoalescingBulkloader.java b/examples/coalescing-bulkloader/src/main/java/com/github/benmanes/caffeine/examples/coalescing/bulkloader/CoalescingBulkloader.java index de8d3ca7ac..3c287519bc 100644 --- a/examples/coalescing-bulkloader/src/main/java/com/github/benmanes/caffeine/examples/coalescing/bulkloader/CoalescingBulkloader.java +++ b/examples/coalescing-bulkloader/src/main/java/com/github/benmanes/caffeine/examples/coalescing/bulkloader/CoalescingBulkloader.java @@ -187,7 +187,8 @@ public CompletableFuture asyncLoad(Key key, Executor executor) { } private void startWaiting() { - ScheduledFuture oldSchedule = schedule.getAndSet(timer.schedule(this::doLoad, maxDelay, MILLISECONDS)); + ScheduledFuture oldSchedule = schedule.getAndSet( + timer.schedule(this::doLoad, maxDelay, MILLISECONDS)); if (oldSchedule != null) { oldSchedule.cancel(false); } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 1e63d269c3..b0dd2c925d 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -80,7 +80,7 @@ ext { junit5: '5.9.1', junitTestNG: '1.0.4', lincheck: '2.16', - mockito: '4.9.0', + mockito: '4.10.0', osgiSvcComponent: '1.5.0', osgiUtilFunction: '1.2.0', osgiUtilPromise: '1.2.0',