From 7781b41a4c2406d27999d45c5eec936d83812435 Mon Sep 17 00:00:00 2001 From: Peter Gafert Date: Wed, 10 Apr 2024 23:10:21 +0200 Subject: [PATCH] upgrade Spotbugs plugin to latest version 6.0.11 Otherwise, `Objects.requireNonNull(..)` causes false positives. Signed-off-by: Peter Gafert --- build.gradle | 22 +++++++++---------- .../code_quality/spotbugs-excludes.xml | 5 +++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 2a6eafa06f..1dbb387671 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'archunit.base-conventions' id 'com.github.johnrengelman.shadow' version '7.1.2' apply false - id 'com.github.spotbugs' version '5.1.4' apply false + id 'com.github.spotbugs' version '6.0.11' apply false id "io.github.gradle-nexus.publish-plugin" version "1.3.0" apply false id "com.diffplug.spotless" version "6.25.0" apply false id 'com.github.ben-manes.versions' version '0.51.0' apply false @@ -38,14 +38,14 @@ ext { asm : [group: 'org.ow2.asm', name: 'asm', version: '9.7'], guava : [group: 'com.google.guava', name: 'guava', version: '33.1.0-jre'], addGuava : { dependencyHandler -> - dependencyHandler(dependency.guava) { - exclude module: 'listenablefuture' - exclude module: 'jsr305' - exclude module: 'checker-qual' - exclude module: 'error_prone_annotations' - exclude module: 'j2objc-annotations' - } - }, + dependencyHandler(dependency.guava) { + exclude module: 'listenablefuture' + exclude module: 'jsr305' + exclude module: 'checker-qual' + exclude module: 'error_prone_annotations' + exclude module: 'j2objc-annotations' + } + }, slf4j : [group: 'org.slf4j', name: 'slf4j-api', version: '2.0.12'], log4j_api : [group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.23.1'], log4j_core : [group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.23.1'], @@ -82,8 +82,8 @@ ext { minSupportedJavaVersion = JavaVersion.VERSION_1_8 maxSupportedJavaVersion = JavaVersion.VERSION_17 isTestBuild = project.hasProperty('testJavaVersion') - configuredTestJavaVersion = project.findProperty('testJavaVersion')?.toString()?.with {JavaVersion.toVersion(it) } - assert configuredTestJavaVersion <= maxSupportedJavaVersion : + configuredTestJavaVersion = project.findProperty('testJavaVersion')?.toString()?.with { JavaVersion.toVersion(it) } + assert configuredTestJavaVersion <= maxSupportedJavaVersion: "Cannot test with ${configuredTestJavaVersion} because it is higher than max supported version ${maxSupportedJavaVersion}" postfixedJar = { File jarFile, String postfix -> diff --git a/buildSrc/src/main/resources/code_quality/spotbugs-excludes.xml b/buildSrc/src/main/resources/code_quality/spotbugs-excludes.xml index 0df9b98438..fa69993f56 100644 --- a/buildSrc/src/main/resources/code_quality/spotbugs-excludes.xml +++ b/buildSrc/src/main/resources/code_quality/spotbugs-excludes.xml @@ -9,6 +9,11 @@ + + + + +