From 5f3edfd49662bf1dbb09a515c782e02dd1936b48 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 15 Jan 2024 12:44:11 -0700 Subject: [PATCH 1/4] Suppress two more warnings for spotbugs 4.8.3 Will be needed with parent pom 4.77. --- lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java | 1 + .../org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java b/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java index 972502b4a..97bd4aa7d 100644 --- a/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java +++ b/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java @@ -34,6 +34,7 @@ public Next receive(Object o) { return new ContinuationImpl(e, k).then(b, e, cast); } + @SuppressFBWarnings(value = "SIC_INNER_SHOULD_BE_STATIC", justification = "Common Jenkins pattern that inner classses are not static.") class ContinuationImpl extends ContinuationGroup { final Continuation k; final Env e; diff --git a/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java b/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java index 181471b5a..5d243407b 100644 --- a/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java +++ b/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java @@ -267,6 +267,7 @@ public class CpsFlowExecution extends FlowExecution implements BlockableResume { * * @see #runInCpsVmThread(FutureCallback) */ + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") public transient volatile ListenableFuture programPromise; private transient volatile Collection> pickleFutures; From 4faceab6b3cd1e00cfe60c1d182cf175ecf41445 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 16 Jan 2024 13:09:44 -0700 Subject: [PATCH 2/4] Change justification to "too late" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit so that is really a bug…but not one that we can fix compatibly now (since builds may be running across the upgrade). Co-authored-by: Jesse Glick --- lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java b/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java index 97bd4aa7d..a7fed8c48 100644 --- a/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java +++ b/lib/src/main/java/com/cloudbees/groovy/cps/impl/NotBlock.java @@ -34,7 +34,7 @@ public Next receive(Object o) { return new ContinuationImpl(e, k).then(b, e, cast); } - @SuppressFBWarnings(value = "SIC_INNER_SHOULD_BE_STATIC", justification = "Common Jenkins pattern that inner classses are not static.") + @SuppressFBWarnings(value = "SIC_INNER_SHOULD_BE_STATIC", justification = "Too late to fix compatibly.") class ContinuationImpl extends ContinuationGroup { final Continuation k; final Env e; From 0720fe360a0fed603c38df315d43cf01f6920c0a Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 16 Jan 2024 13:10:04 -0700 Subject: [PATCH 3/4] Change justification to TODO Co-authored-by: Jesse Glick --- .../org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java b/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java index 5d243407b..a0a01a0c6 100644 --- a/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java +++ b/plugin/src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowExecution.java @@ -267,7 +267,7 @@ public class CpsFlowExecution extends FlowExecution implements BlockableResume { * * @see #runInCpsVmThread(FutureCallback) */ - @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "TODO clean up") public transient volatile ListenableFuture programPromise; private transient volatile Collection> pickleFutures; From db9c7812dc11584b4bac54a9f9afb22088564e7c Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 16 Jan 2024 13:12:27 -0700 Subject: [PATCH 4/4] Use parent pom 4.77 https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.77 describes the changes in the 4.77 release of the parent pom. Those changes include: * https://github.com/jenkinsci/plugin-pom/pull/880 - test harness update * https://github.com/jenkinsci/plugin-pom/pull/884 - spotbugs plugin update Other dependencies were also updated in that parent pom. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 38fbafc47..e09a9ae4e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 4.76 + 4.77 org.jenkins-ci.plugins.workflow