From beada6d7897a1ba676799917ed7df5a7d7add7a0 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Sun, 24 Dec 2023 17:14:25 -0700 Subject: [PATCH] Summary: Use spotbugs 4.8.2 with more exclusions Prep for * https://github.com/jenkinsci/pom/pull/510 Part of the checklist in: * https://github.com/jenkinsci/jenkins/pull/8803 --- core/src/main/java/org/kohsuke/stapler/TokenList.java | 2 ++ .../main/java/org/kohsuke/stapler/export/ExportConfig.java | 3 +++ pom.xml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/core/src/main/java/org/kohsuke/stapler/TokenList.java b/core/src/main/java/org/kohsuke/stapler/TokenList.java index 0041347632..eda5f88dfa 100644 --- a/core/src/main/java/org/kohsuke/stapler/TokenList.java +++ b/core/src/main/java/org/kohsuke/stapler/TokenList.java @@ -23,6 +23,7 @@ package org.kohsuke.stapler; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.StringTokenizer; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; @@ -46,6 +47,7 @@ public final class TokenList { /** * Index of the next token. */ + @SuppressFBWarnings(value="PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification="Preserve API compatibility") public int idx; /** diff --git a/core/src/main/java/org/kohsuke/stapler/export/ExportConfig.java b/core/src/main/java/org/kohsuke/stapler/export/ExportConfig.java index 2196451370..0c0058fd09 100644 --- a/core/src/main/java/org/kohsuke/stapler/export/ExportConfig.java +++ b/core/src/main/java/org/kohsuke/stapler/export/ExportConfig.java @@ -1,5 +1,7 @@ package org.kohsuke.stapler.export; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Controls the output behaviour. * @@ -11,6 +13,7 @@ public class ExportConfig { * Use getter and setter */ @Deprecated + @SuppressFBWarnings(value="PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification="Preserve API compatibility") public boolean prettyPrint; private ClassAttributeBehaviour classAttribute = ClassAttributeBehaviour.IF_NEEDED; diff --git a/pom.xml b/pom.xml index 44cf2e8945..a8c2d19724 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,10 @@ HEAD 10.0.18 jenkinsci/stapler + + + 4.8.2.0 + FindReturnRef,ConstructorThrow