From 3bb48661608ebb94b6a46f026e4fc2568c0a5c2c Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Mon, 15 Jan 2024 18:38:29 -0700 Subject: [PATCH 1/3] Suppress warnings for spotbugs 4.8.3 https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.77) Plugin pom 4.77 needs this change to resolve new spotbugs warnings that will be reported by spotbugs 4.8.3 and later. Can skip the changelog, since this is not visible to users. Confirmed that the spotbugs warnings are visible when using the 4.77-SNAPSHOT plugin pom before this change. With this change, the spotbugs warnings are no longer visible. Confirmed that spotbugs is silent with plugin pom 4.77 after this change. --- .../credentialsbinding/impl/SSHUserPrivateKeyBinding.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java b/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java index 59d63c8d..291291c5 100644 --- a/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java +++ b/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java @@ -26,6 +26,7 @@ import com.google.common.collect.ImmutableSet; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import hudson.Extension; import hudson.FilePath; import hudson.Launcher; @@ -48,7 +49,9 @@ public class SSHUserPrivateKeyBinding extends MultiBinding { public final String keyFileVariable; + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") public String usernameVariable; + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") public String passphraseVariable; @DataBoundConstructor public SSHUserPrivateKeyBinding(@NonNull String keyFileVariable, String credentialsId) { From 8afc32c326f006c6e1f10794a6b16d60c1a6a7df Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 16 Jan 2024 13:02:08 -0700 Subject: [PATCH 2/3] Change justification into a TODO Co-authored-by: Jesse Glick --- .../credentialsbinding/impl/SSHUserPrivateKeyBinding.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java b/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java index 291291c5..9cbe836e 100644 --- a/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java +++ b/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyBinding.java @@ -49,9 +49,9 @@ public class SSHUserPrivateKeyBinding extends MultiBinding { public final String keyFileVariable; - @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "TODO clean up") public String usernameVariable; - @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Preserve API compatibility.") + @SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "TODO clean up") public String passphraseVariable; @DataBoundConstructor public SSHUserPrivateKeyBinding(@NonNull String keyFileVariable, String credentialsId) { From 00ecfef4e13598c0fa0e9b377ec9d31c5aad71a3 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Tue, 16 Jan 2024 13:03:07 -0700 Subject: [PATCH 3/3] 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 updaetd in that parent pom. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4a3b09f..4bafaff7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 4.76 + 4.77