From 8d692ded9cb75df515303a16f6a4393c9d5f3726 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 8 Nov 2025 14:35:22 +0100 Subject: [PATCH 1/2] Do not add JSR305 as test dependency --- .github/workflows/ci.yml | 1 + pom.xml | 8 -------- src/main/java/edu/hm/hafner/util/Ensure.java | 13 +++++++------ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 418482aa..fead95b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: build: strategy: + fail-fast: false matrix: platform: [ubuntu-latest, macos-latest, windows-latest] jdk: [21, 25] diff --git a/pom.xml b/pom.xml index 3fe7db31..9c10d51f 100644 --- a/pom.xml +++ b/pom.xml @@ -207,14 +207,6 @@ ${slf4j.version} test - - - - com.google.code.findbugs - jsr305 - 3.0.2 - test - diff --git a/src/main/java/edu/hm/hafner/util/Ensure.java b/src/main/java/edu/hm/hafner/util/Ensure.java index 8e35d47c..d321a2e0 100644 --- a/src/main/java/edu/hm/hafner/util/Ensure.java +++ b/src/main/java/edu/hm/hafner/util/Ensure.java @@ -1,17 +1,17 @@ package edu.hm.hafner.util; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Formatter; -import java.util.List; - import com.google.errorprone.annotations.FormatMethod; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.CheckReturnValue; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Formatter; +import java.util.List; + /** * Provides several helper methods to validate method arguments and class invariants, thus supporting the design by * contract concept (DBC). @@ -510,6 +510,7 @@ public static class ObjectCondition { * @param value * value of the condition */ + @SuppressWarnings("ExplicitArrayForVarargs") public ObjectCondition(@CheckForNull final T value) { this(value, new Object[0]); } From 08389ec46dd926d97d58bb8d5ce7e4e8449393f0 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 8 Nov 2025 14:39:28 +0100 Subject: [PATCH 2/2] Deactivate rule `SuppressWarningsWithoutExplanation` This rule creates too much noise. --- pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pom.xml b/pom.xml index 9c10d51f..3d1db184 100644 --- a/pom.xml +++ b/pom.xml @@ -638,6 +638,8 @@ NullAway configuration: --> -XepOpt:NullAway:AnnotatedPackages=edu.hm.hafner -Xep:SuppressWarningsWithoutExplanation:OFF -Xep:AddNullMarkedToPackageInfo:OFF -Xep:PreferredInterfaceType:OFF