From 8c3c84fc1d917632d405cb9c31cfb7c42261bc14 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Sat, 14 Dec 2024 11:08:03 -0800 Subject: [PATCH] enable nullaway on unit tests (wip) --- .../caffeine/cache/BoundedLocalCache.java | 2 + .../caffeine/cache/LinkedDequeSubject.java | 9 +++- .../caffeine/cache/LocalCacheSubject.java | 43 ++++++++++++------- .../caffeine/cache/MultiThreadedTest.java | 2 +- .../caffeine/cache/SchedulerTest.java | 2 + .../ConcurrentHashMapAcceptanceTest.java | 2 + .../caffeine/testing/CollectionSubject.java | 11 ++++- .../caffeine/testing/LoggingEvents.java | 4 +- .../benmanes/caffeine/testing/MapSubject.java | 13 +++++- .../gradle/libs.versions.toml | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../settings.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- examples/graal-native/settings.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- examples/hibernate/settings.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- examples/indexable/settings.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../resilience-failsafe/settings.gradle.kts | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../write-behind-rxjava/settings.gradle.kts | 2 +- gradle/libs.versions.toml | 8 ++-- gradle/plugins/settings.gradle.kts | 2 +- .../quality/errorprone.caffeine.gradle.kts | 2 + gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 4 +- 27 files changed, 87 insertions(+), 45 deletions(-) diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java index 3d5d2314f2..20a71a3da1 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java @@ -3163,6 +3163,7 @@ T expireAfterAccessOrder(boolean oldest, Function<@Nullable V, @Nullable V> * @param mappingFunction the mapping function to compute a value * @return the computed value */ + @SuppressWarnings("NullAway") T snapshot(Iterable> iterable, Function<@Nullable V, @Nullable V> transformer, Function>, T> mappingFunction) { requireNonNull(mappingFunction); @@ -4009,6 +4010,7 @@ static final class BoundedPolicy implements Policy { @Override public @Nullable V getIfPresentQuietly(K key) { return transformer.apply(cache.getIfPresentQuietly(key)); } + @SuppressWarnings("NullAway") @Override public @Nullable CacheEntry getEntryIfPresentQuietly(K key) { Node node = cache.data.get(cache.nodeFactory.newLookupKey(key)); return (node == null) ? null : cache.nodeToCacheEntry(node, transformer); diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LinkedDequeSubject.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LinkedDequeSubject.java index 209b281e48..b5bf5ed895 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LinkedDequeSubject.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/LinkedDequeSubject.java @@ -16,9 +16,12 @@ package com.github.benmanes.caffeine.cache; import static com.google.common.truth.Truth.assertAbout; +import static java.util.Objects.requireNonNull; import java.util.Iterator; +import org.jspecify.annotations.Nullable; + import com.github.benmanes.caffeine.testing.CollectionSubject; import com.google.common.collect.Sets; import com.google.common.truth.FailureMetadata; @@ -29,10 +32,10 @@ * @author ben.manes@gmail.com (Ben Manes) */ final class LinkedDequeSubject extends CollectionSubject { - private final LinkedDeque actual; + private final @Nullable LinkedDeque actual; @SuppressWarnings("unchecked") - private LinkedDequeSubject(FailureMetadata metadata, LinkedDeque subject) { + private LinkedDequeSubject(FailureMetadata metadata, @Nullable LinkedDeque subject) { super(metadata, subject); this.actual = (LinkedDeque) subject; } @@ -46,6 +49,7 @@ public static LinkedDequeSubject assertThat(LinkedDeque actual) { } public void isValid() { + requireNonNull(actual); if (actual.isEmpty()) { isExhaustivelyEmpty(); } @@ -65,6 +69,7 @@ private void checkIterator(Iterator iterator) { } private void checkElement(Object element) { + requireNonNull(actual); var first = actual.peekFirst(); var last = actual.peekLast(); if (element == first) { 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 e4163ad913..31b780206d 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 @@ -19,6 +19,7 @@ import static com.github.benmanes.caffeine.testing.Awaits.await; import static com.github.benmanes.caffeine.testing.MapSubject.map; import static com.google.common.truth.Truth.assertThat; +import static java.util.Objects.requireNonNull; import java.util.Collection; import java.util.Map; @@ -26,6 +27,8 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; +import org.jspecify.annotations.Nullable; + import com.github.benmanes.caffeine.cache.Async.AsyncWeigher; import com.github.benmanes.caffeine.cache.BoundedLocalCache.BoundedLocalAsyncCache; import com.github.benmanes.caffeine.cache.BoundedLocalCache.BoundedLocalAsyncLoadingCache; @@ -52,9 +55,9 @@ */ @SuppressWarnings("GuardedBy") public final class LocalCacheSubject extends Subject { - private final Object actual; + private final @Nullable Object actual; - private LocalCacheSubject(FailureMetadata metadata, Object subject) { + private LocalCacheSubject(FailureMetadata metadata, @Nullable Object subject) { super(metadata, subject); this.actual = subject; } @@ -73,6 +76,7 @@ private LocalCacheSubject(FailureMetadata metadata, Object subject) { @SuppressWarnings({"rawtypes", "unchecked"}) public void isValid() { + requireNonNull(actual); if (actual instanceof BoundedLocalCache) { var bounded = (BoundedLocalCache) actual; checkBounded(bounded); @@ -298,11 +302,12 @@ private void checkLinks(BoundedLocalCache bounded, long totalWeightedSize = 0; Set> seen = Sets.newIdentityHashSet(); for (var cell : deques.cellSet()) { - long weightedSize = scanLinks(bounded, cell.getValue(), seen); - check("%s: %s in %s", cell.getRowKey(), cell.getValue(), bounded.data) + var deque = requireNonNull(cell.getValue()); + long weightedSize = scanLinks(bounded, deque, seen); + check("%s: %s in %s", cell.getRowKey(), deque, bounded.data) .that(weightedSize).isEqualTo(cell.getColumnKey()); - totalSize += cell.getValue().size(); totalWeightedSize += weightedSize; + totalSize += deque.size(); } check("linkSize").withMessage("cache.size() != links").that(bounded).hasSize(seen.size()); check("totalSize").withMessage("cache.size() == deque.size()").that(bounded).hasSize(totalSize); @@ -354,7 +359,7 @@ private void checkNode(BoundedLocalCache bounded, Node bounded, - Node node, Object key, Object value) { + Node node, @Nullable Object key, @Nullable Object value) { if (bounded.collectKeys()) { if ((key != null) && (value != null)) { check("bounded").that(bounded).containsKey(key); @@ -368,10 +373,11 @@ private void checkKey(BoundedLocalCache bounded, } private void checkValue(BoundedLocalCache bounded, - Node node, Object key, Object value) { + Node node, @Nullable Object key, @Nullable Object value) { if (!bounded.collectValues()) { check("value").that(value).isNotNull(); if ((key != null) && !bounded.hasExpired(node, bounded.expirationTicker().read())) { + requireNonNull(value); check("containsValue(value) for key %s", key) .about(map()).that(bounded).containsValue(value); } @@ -379,7 +385,7 @@ private void checkValue(BoundedLocalCache bounded, checkIfAsyncValue(value); } - private void checkIfAsyncValue(Object value) { + private void checkIfAsyncValue(@Nullable Object value) { if (value instanceof CompletableFuture) { var future = (CompletableFuture) value; if (!future.isDone() || future.isCompletedExceptionally()) { @@ -390,18 +396,23 @@ private void checkIfAsyncValue(Object value) { } private void checkWeight(BoundedLocalCache bounded, - Node node, Object key, Object value) { + Node node, @Nullable Object key, @Nullable Object value) { check("node.getWeight").that(node.getWeight()).isAtLeast(0); + if ((key == null) || (value == null)) { + return; + } - var weigher = bounded.weigher; - boolean canCheckWeight = (weigher == Weighers.random()); + Weigher weigher = bounded.weigher; if (weigher instanceof AsyncWeigher) { - @SuppressWarnings("rawtypes") - var asyncWeigher = (AsyncWeigher) weigher; - canCheckWeight = (asyncWeigher.delegate == Weighers.random()); + weigher = ((AsyncWeigher) weigher).delegate; + } + if (weigher instanceof BoundedWeigher) { + weigher = ((BoundedWeigher) weigher).delegate; } - if (canCheckWeight) { - check("node.getWeight()").that(node.getWeight()).isEqualTo(weigher.weigh(key, value)); + if (weigher != Weighers.random()) { + @SuppressWarnings({"rawtypes", "unchecked"}) + int weight = ((Weigher) weigher).weigh(key, value); + check("node.getWeight()").that(node.getWeight()).isEqualTo(weight); } } diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/MultiThreadedTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/MultiThreadedTest.java index 37b4045150..9347d6722f 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/MultiThreadedTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/MultiThreadedTest.java @@ -67,7 +67,7 @@ public void concurrent_unbounded(LoadingCache cache, CacheContext cont } @Test(dataProvider = "caches") - @CacheSpec(maximumSize = Maximum.FULL, weigher = {CacheWeigher.DISABLED, CacheWeigher.RANDOM}, + @CacheSpec(maximumSize = Maximum.FULL, weigher = {CacheWeigher.RANDOM}, stats = Stats.DISABLED, population = Population.EMPTY, removalListener = Listener.DISABLED, refreshAfterWrite = { Expire.DISABLED, Expire.ONE_MILLISECOND }, keys = ReferenceType.STRONG, values = ReferenceType.STRONG, diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/SchedulerTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/SchedulerTest.java index 5864fd7cc3..fd5b09fe90 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/cache/SchedulerTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/cache/SchedulerTest.java @@ -125,6 +125,7 @@ public void disabledFuture_null() { /* --------------- guarded --------------- */ @Test + @SuppressWarnings("NullAway") public void guardedScheduler_null() { assertThrows(NullPointerException.class, () -> Scheduler.guardedScheduler(null)); } @@ -166,6 +167,7 @@ public void guardedScheduler_exception() { /* --------------- ScheduledExecutorService --------------- */ @Test + @SuppressWarnings("NullAway") public void scheduledExecutorService_null() { assertThrows(NullPointerException.class, () -> Scheduler.forScheduledExecutorService(null)); } diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/eclipse/acceptance/ConcurrentHashMapAcceptanceTest.java b/caffeine/src/test/java/com/github/benmanes/caffeine/eclipse/acceptance/ConcurrentHashMapAcceptanceTest.java index e9addaf1a2..780306989a 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/eclipse/acceptance/ConcurrentHashMapAcceptanceTest.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/eclipse/acceptance/ConcurrentHashMapAcceptanceTest.java @@ -25,6 +25,7 @@ import org.eclipse.collections.impl.list.Interval; import org.eclipse.collections.impl.parallel.ParallelIterate; import org.eclipse.collections.impl.test.Verify; +import org.jspecify.annotations.NullUnmarked; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -35,6 +36,7 @@ * * Ported from Eclipse Collections 11.0. */ +@NullUnmarked @SuppressWarnings("CanIgnoreReturnValueSuggester") public abstract class ConcurrentHashMapAcceptanceTest { private ExecutorService executor; diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/CollectionSubject.java b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/CollectionSubject.java index 8dc625538e..e1f8dcefff 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/CollectionSubject.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/CollectionSubject.java @@ -17,6 +17,7 @@ import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.truth.Truth.assertAbout; +import static java.util.Objects.requireNonNull; import java.util.Collection; import java.util.Deque; @@ -25,6 +26,8 @@ import java.util.Queue; import java.util.Set; +import org.jspecify.annotations.Nullable; + import com.google.common.truth.FailureMetadata; import com.google.common.truth.IterableSubject; @@ -34,9 +37,9 @@ * @author ben.manes@gmail.com (Ben Manes) */ public class CollectionSubject extends IterableSubject { - private final Collection actual; + private final @Nullable Collection actual; - public CollectionSubject(FailureMetadata metadata, Collection subject) { + public CollectionSubject(FailureMetadata metadata, @Nullable Collection subject) { super(metadata, subject); this.actual = subject; } @@ -56,6 +59,7 @@ public final void hasSize(long expectedSize) { /** Fails if the collection does not have less than the given size. */ public void hasSizeLessThan(long other) { + requireNonNull(actual); checkArgument(other >= 0, "expectedSize (%s) must be >= 0", other); check("size()").that(actual.size()).isLessThan(Math.toIntExact(other)); } @@ -68,6 +72,7 @@ public void hasSizeLessThan(long other) { public void isExhaustivelyEmpty() { checkIterable(); checkCollection(); + requireNonNull(actual); if (actual instanceof Set) { checkSet((Set) actual); } @@ -83,11 +88,13 @@ public void isExhaustivelyEmpty() { } private void checkIterable() { + requireNonNull(actual); check("iterator().hasNext()").that(actual.iterator().hasNext()).isFalse(); } @SuppressWarnings("CollectionToArray") private void checkCollection() { + requireNonNull(actual); check("size()").that(actual).hasSize(0); check("isEmpty()").that(actual).isEmpty(); check("toArray()").that(actual.toArray()).isEmpty(); diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/LoggingEvents.java b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/LoggingEvents.java index 4b793c3624..cd1b19bcc3 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/LoggingEvents.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/LoggingEvents.java @@ -25,6 +25,7 @@ import java.util.Objects; import java.util.function.Predicate; +import org.jspecify.annotations.Nullable; import org.slf4j.event.Level; import com.github.valfirst.slf4jtest.LoggingEvent; @@ -43,7 +44,8 @@ public final class LoggingEvents extends ForwardingList { private final List> predicates; private final ImmutableList events; - private ImmutableList filteredEvents; + private @Nullable ImmutableList filteredEvents; + private boolean exclusive; private LoggingEvents(Iterable events) { diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/MapSubject.java b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/MapSubject.java index 32c767e4da..527c755a77 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/testing/MapSubject.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/testing/MapSubject.java @@ -18,9 +18,12 @@ import static com.github.benmanes.caffeine.testing.CollectionSubject.collection; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.truth.Truth.assertAbout; +import static java.util.Objects.requireNonNull; import java.util.Map; +import org.jspecify.annotations.Nullable; + import com.google.common.collect.ImmutableSet; import com.google.common.collect.Range; import com.google.common.truth.FailureMetadata; @@ -34,9 +37,9 @@ */ public class MapSubject extends com.google.common.truth.MapSubject { @SuppressWarnings("ImmutableMemberCollection") - private final Map actual; + private final @Nullable Map actual; - public MapSubject(FailureMetadata metadata, Map subject) { + public MapSubject(FailureMetadata metadata, @Nullable Map subject) { super(metadata, subject); this.actual = subject; } @@ -56,29 +59,34 @@ public final void hasSize(long expectedSize) { /** Fails if the map does not have less than the given size. */ public void hasSizeLessThan(long other) { + requireNonNull(actual); checkArgument(other >= 0, "expectedSize (%s) must be >= 0", other); check("size()").that(actual.size()).isLessThan(Math.toIntExact(other)); } /** Fails if the map's size is not in {@code range}. */ public void hasSizeIn(Range range) { + requireNonNull(actual); check("size()").that(actual.size()).isIn(range); } /** Fails if the map does not contain the given keys, where duplicate keys are ignored. */ @CanIgnoreReturnValue public Ordered containsExactlyKeys(Iterable keys) { + requireNonNull(actual); return check("containsKeys").that(actual.keySet()) .containsExactlyElementsIn(ImmutableSet.copyOf(keys)); } /** Fails if the map does not contain the given value. */ public void containsValue(Object value) { + requireNonNull(actual); check("containsValue").that(actual.values()).contains(value); } /** Fails if the map does contain the given value. */ public void doesNotContainValue(Object value) { + requireNonNull(actual); check("containsValue").that(actual.values()).doesNotContain(value); } @@ -87,6 +95,7 @@ public void doesNotContainValue(Object value) { * methods. */ public void isExhaustivelyEmpty() { + requireNonNull(actual); isEqualTo(Map.of()); hasSize(0); isEmpty(); diff --git a/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml b/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml index 8ccad706c3..85ee0daab6 100644 --- a/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml +++ b/examples/coalescing-bulkloader-reactor/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] caffeine = "3.1.8" junit = "5.11.3" -reactor = "3.7.0" +reactor = "3.7.1" truth = "1.4.4" versions = "0.51.0" diff --git a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties +++ b/examples/coalescing-bulkloader-reactor/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/coalescing-bulkloader-reactor/settings.gradle.kts b/examples/coalescing-bulkloader-reactor/settings.gradle.kts index 149babf6c3..53023a7268 100644 --- a/examples/coalescing-bulkloader-reactor/settings.gradle.kts +++ b/examples/coalescing-bulkloader-reactor/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/graal-native/gradle/wrapper/gradle-wrapper.properties +++ b/examples/graal-native/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/graal-native/settings.gradle.kts b/examples/graal-native/settings.gradle.kts index a5e4cd278c..1bb26f570f 100644 --- a/examples/graal-native/settings.gradle.kts +++ b/examples/graal-native/settings.gradle.kts @@ -5,7 +5,7 @@ pluginManagement { } } plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/hibernate/gradle/wrapper/gradle-wrapper.properties +++ b/examples/hibernate/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/hibernate/settings.gradle.kts b/examples/hibernate/settings.gradle.kts index 8a0dbec0f9..a6fd48777d 100644 --- a/examples/hibernate/settings.gradle.kts +++ b/examples/hibernate/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/examples/indexable/gradle/wrapper/gradle-wrapper.properties b/examples/indexable/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/indexable/gradle/wrapper/gradle-wrapper.properties +++ b/examples/indexable/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/indexable/settings.gradle.kts b/examples/indexable/settings.gradle.kts index e17d97cef9..58d363260e 100644 --- a/examples/indexable/settings.gradle.kts +++ b/examples/indexable/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties +++ b/examples/resilience-failsafe/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/resilience-failsafe/settings.gradle.kts b/examples/resilience-failsafe/settings.gradle.kts index 0ddb809517..090e9af4ed 100644 --- a/examples/resilience-failsafe/settings.gradle.kts +++ b/examples/resilience-failsafe/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties b/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties +++ b/examples/write-behind-rxjava/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/examples/write-behind-rxjava/settings.gradle.kts b/examples/write-behind-rxjava/settings.gradle.kts index d04c4ad195..c288943379 100644 --- a/examples/write-behind-rxjava/settings.gradle.kts +++ b/examples/write-behind-rxjava/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fa913b441d..46773c3b27 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,14 +7,14 @@ bnd = "7.1.0" bouncycastle-jdk18on = "1.79" cache2k = "2.6.1.Final" caffeine = "3.1.8" -checkstyle = "10.20.2" +checkstyle = "10.21.0" coherence = "24.09" commons-collections4 = "4.4" commons-compress = "1.27.1" commons-io = "2.18.0" commons-lang3 = "3.17.0" commons-math3 = "3.6.1" -commons-text = "1.12.0" +commons-text = "1.13.0" concurrentlinkedhashmap = "1.4.2" config = "1.4.3" coveralls = "2.12.2" @@ -32,7 +32,7 @@ felix-scr = "2.2.12" findsecbugs = "1.13.0" flip-tables = "1.1.1" forbidden-apis = "3.8" -google-java-format = "1.25.0" +google-java-format = "1.25.2" guava = "33.3.1-jre" guice = "6.0.0" h2 = "2.3.232" @@ -68,7 +68,7 @@ kotlin = "2.1.0" lincheck = "2.34" mockito = "5.14.2" nexus-publish = "2.0.0" -nullaway = "0.12.1" +nullaway = "0.12.2" nullaway-plugin = "2.1.0" okhttp-bom = "4.12.0" okio-bom = "3.9.1" diff --git a/gradle/plugins/settings.gradle.kts b/gradle/plugins/settings.gradle.kts index 613c7e28ec..c8e64b1f28 100644 --- a/gradle/plugins/settings.gradle.kts +++ b/gradle/plugins/settings.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } diff --git a/gradle/plugins/src/main/kotlin/quality/errorprone.caffeine.gradle.kts b/gradle/plugins/src/main/kotlin/quality/errorprone.caffeine.gradle.kts index 115c71bedc..a71aa47639 100644 --- a/gradle/plugins/src/main/kotlin/quality/errorprone.caffeine.gradle.kts +++ b/gradle/plugins/src/main/kotlin/quality/errorprone.caffeine.gradle.kts @@ -66,6 +66,8 @@ tasks.withType().configureEach { nullaway { if (name.contains("Test")) { disable() + } else { + error() } annotatedPackages.add("com.github.benmanes.caffeine") annotatedPackages.add("com.google.common") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0cdabcd31b..c085078342 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-rc-1-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle.kts b/settings.gradle.kts index cab1d2d545..451101b3ab 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,9 +2,9 @@ pluginManagement { includeBuild("gradle/plugins") } plugins { - id("com.gradle.develocity") version "3.18.2" + id("com.gradle.develocity") version "3.19" id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.2" - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0" } dependencyResolutionManagement {