diff --git a/.github/actions/run-gradle/action.yml b/.github/actions/run-gradle/action.yml index 869f0ac4e7..1e118cc277 100644 --- a/.github/actions/run-gradle/action.yml +++ b/.github/actions/run-gradle/action.yml @@ -8,7 +8,7 @@ inputs: required: true description: The JDK version early-access: - default: '21' + default: '22' required: false description: The early access release graal: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cee8cf158..8638d190f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ env: schemastore.org:443 www.graalvm.org:443 PUBLISH_JDK: 11 - EA_JDK: 21 + EA_JDK: 22 jobs: compile: @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 11, 20, 21, GraalVM ] + java: [ 11, 21, 22, GraalVM ] env: JAVA_VERSION: ${{ matrix.java }} steps: diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/ConcurrentHashMap8Test.java b/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/ConcurrentHashMap8Test.java index 7767573077..97cb27b65a 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/ConcurrentHashMap8Test.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/ConcurrentHashMap8Test.java @@ -563,18 +563,18 @@ public void testToArray2() { // mustEqual(y, x); // } - static final int SIZE = 10000; - static ConcurrentMap longMap; - - static ConcurrentMap longMap() { - if (longMap == null) { - longMap = bounded(); - for (int i = 0; i < SIZE; ++i) { - longMap.put(Long.valueOf(i), Long.valueOf(2 *i)); - } - } - return longMap; - } +// static final int SIZE = 10000; +// static ConcurrentMap longMap; +// +// static ConcurrentMap longMap() { +// if (longMap == null) { +// longMap = bounded(); +// for (int i = 0; i < SIZE; ++i) { +// longMap.put(Long.valueOf(i), Long.valueOf(2 *i)); +// } +// } +// return longMap; +// } // explicit function class to avoid type inference problems static class AddKeys implements BiFunction, Map.Entry, Map.Entry> { diff --git a/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/JSR166TestCase.java b/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/JSR166TestCase.java index c94e71f37f..7357cfb7fb 100644 --- a/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/JSR166TestCase.java +++ b/caffeine/src/test/java/com/github/benmanes/caffeine/jsr166/JSR166TestCase.java @@ -189,7 +189,7 @@ */ @SuppressWarnings({"AnnotateFormatMethod", "CollectionToArray", "EqualsIncompatibleType", "FunctionalInterfaceClash", "JavaUtilDate", "JUnit3FloatingPointComparisonWithoutDelta", - "NumericEquality", "rawtypes", "ReferenceEquality", + "NonFinalStaticField", "NumericEquality", "rawtypes", "ReferenceEquality", "RethrowReflectiveOperationExceptionAsLinkageError", "serial", "SwitchDefault", "ThreadPriorityCheck", "try", "unchecked", "UndefinedEquals"}) public class JSR166TestCase extends TestCase { diff --git a/examples/coalescing-bulkloader-reactor/README.md b/examples/coalescing-bulkloader-reactor/README.md index 0c2e6c5e8d..e3fc14bc30 100644 --- a/examples/coalescing-bulkloader-reactor/README.md +++ b/examples/coalescing-bulkloader-reactor/README.md @@ -1,9 +1,3 @@ -[Reactor][reactor] data streams facilitate the consolidation of independent asynchronous loads into -batches at the cost of a small buffering delay. The [bufferTimeout][] operator accumulates requests -until reaching a maximum size or time limit. Since each request consists of a key and its pending -result, when the subscriber is notified it performs the batch load and completes the key's future -with its corresponding value. - It some scenarios it may be desirable to only aggregate cache refreshes rather than imposing delays on callers awaiting explicit loads. An automated reload initiated by `refreshAfterWrite` will occur on the first stale request for an entry. While the key is being refreshed the previous value @@ -11,6 +5,12 @@ continues to be returned, in contrast to eviction which forces retrievals to wai is loaded anew. In such cases, batching these optimistic reloads can minimize the impact on the source system without adversely affecting the responsiveness of the explicit requests. +[Reactor][reactor] data streams facilitate the consolidation of independent asynchronous loads into +batches at the cost of a small buffering delay. The [bufferTimeout][] operator accumulates requests +until reaching a maximum size or time limit. Since each request consists of a key and its pending +result, when the subscriber is notified it performs the batch load and completes the key's future +with its corresponding value. + ### Refresh coalescing A [Sink][sink] collects requests, buffering them up to the configured threshold, and subsequently delivers the batch to the subscriber. The `parallelism` setting determines the number of concurrent diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3fbc590c83..1cbbd4d836 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ coveralls = "2.12.2" dependency-check = "8.4.0" eclipse-collections = "12.0.0.M3" ehcache3 = "3.10.8" -errorprone-core = "2.22.0" +errorprone-core = "2.23.0" errorprone-plugin = "3.1.0" errorprone-support = "0.14.0" expiring-map = "0.5.11" @@ -64,7 +64,7 @@ kotlin = "1.9.10" lincheck = "2.18.1" mockito = "5.6.0" nexus-publish = "2.0.0-rc-1" -nullaway-core = "0.10.14" +nullaway-core = "0.10.15" nullaway-plugin = "1.6.0" ohc = "0.6.1" osgi-annotations = "1.5.1" @@ -81,7 +81,7 @@ snakeyaml = "2.2" sonarqube = "4.4.1.3373" spotbugs-contrib = "7.6.0" spotbugs-core = "4.8.0" -spotbugs-plugin = "6.0.0-beta.5" +spotbugs-plugin = "6.0.0-rc.2" stream = "2.9.8" tcache = "2.0.1" testng = "7.8.0" diff --git a/gradle/plugins/build.gradle.kts b/gradle/plugins/build.gradle.kts index 2a01da14d8..015adf9bf9 100644 --- a/gradle/plugins/build.gradle.kts +++ b/gradle/plugins/build.gradle.kts @@ -36,8 +36,15 @@ dependencies { } tasks.withType { - val ignoredGroups = listOf("org.jetbrains.kotlin", "org.gradle.kotlin.kotlin-dsl") - rejectVersionIf { - (candidate.group in ignoredGroups) && (candidate.version != currentVersion) + resolutionStrategy { + componentSelection { + val ignoredGroups = listOf("org.jetbrains.kotlin", "org.gradle.kotlin.kotlin-dsl") + all { + if ((candidate.group in ignoredGroups) && (candidate.version != currentVersion)) { + reject("kotlin dsl") + } + } + } + force(libs.bnd) } } diff --git a/gradle/plugins/src/main/kotlin/lifecycle/dependency-versions-caffeine-conventions.gradle.kts b/gradle/plugins/src/main/kotlin/lifecycle/dependency-versions-caffeine-conventions.gradle.kts index 818012ee24..4bf0b3da4c 100644 --- a/gradle/plugins/src/main/kotlin/lifecycle/dependency-versions-caffeine-conventions.gradle.kts +++ b/gradle/plugins/src/main/kotlin/lifecycle/dependency-versions-caffeine-conventions.gradle.kts @@ -17,6 +17,7 @@ tasks.named("dependencyUpdates").configure { } } force(libs.guice) + force(libs.lincheck) force(libs.bundles.coherence.get()) } } diff --git a/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts b/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts index f27c5f7da3..ea90028275 100644 --- a/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts +++ b/gradle/plugins/src/main/kotlin/quality/errorprone-caffeine-conventions.gradle.kts @@ -112,6 +112,7 @@ fun enabledChecks() = listOf( "MissingDefault", "MutableGuiceModule", "NoAllocation", + "NonFinalStaticField", "OverridingMethodInconsistentArgumentNamesChecker", "PackageLocation", "PreferredInterfaceType", @@ -120,6 +121,7 @@ fun enabledChecks() = listOf( "RemoveUnusedImports", "ReturnsNullCollection", "SelfAlwaysReturnsThis", + "StringFormatWithLiteral", "StronglyTypeByteString", "StronglyTypeTime", "SwitchDefault", diff --git a/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/TypesafeConfigurator.java b/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/TypesafeConfigurator.java index 18d70bba1b..02caae26ea 100644 --- a/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/TypesafeConfigurator.java +++ b/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/TypesafeConfigurator.java @@ -61,7 +61,9 @@ public final class TypesafeConfigurator { static final Logger logger = System.getLogger(TypesafeConfigurator.class.getName()); + @SuppressWarnings("NonFinalStaticField") static ConfigSource configSource = TypesafeConfigurator::resolveConfig; + @SuppressWarnings("NonFinalStaticField") static FactoryCreator factoryCreator = FactoryBuilder::factoryOf; private TypesafeConfigurator() {}