From c895a034b3d1a6acc592b94b500fc9068615f6b8 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Thu, 2 Oct 2025 11:59:40 -0600 Subject: [PATCH] Remove unnecessary spotbugs suppressions --- cli/src/main/java/hudson/util/QuotedStringTokenizer.java | 4 ---- core/src/main/java/hudson/Functions.java | 1 - core/src/main/java/hudson/util/jna/RegistryKey.java | 4 ---- 3 files changed, 9 deletions(-) diff --git a/cli/src/main/java/hudson/util/QuotedStringTokenizer.java b/cli/src/main/java/hudson/util/QuotedStringTokenizer.java index f031387223..98de36ea27 100644 --- a/cli/src/main/java/hudson/util/QuotedStringTokenizer.java +++ b/cli/src/main/java/hudson/util/QuotedStringTokenizer.java @@ -36,7 +36,6 @@ package hudson.util; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; @@ -140,9 +139,6 @@ public class QuotedStringTokenizer /* ------------------------------------------------------------ */ @Override - @SuppressFBWarnings( - value = {"SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH", "SF_SWITCH_FALLTHROUGH"}, - justification = "TODO needs triage") public boolean hasMoreTokens() { // Already found a token diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index b13d854756..3d2f25b535 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -2470,7 +2470,6 @@ public class Functions { * Advertises the minimum set of HTTP headers that assist programmatic * discovery of Jenkins. */ - @SuppressFBWarnings(value = "UC_USELESS_VOID_METHOD", justification = "TODO needs triage") public static void advertiseHeaders(HttpServletResponse rsp) { Jenkins j = Jenkins.getInstanceOrNull(); if (j != null) { diff --git a/core/src/main/java/hudson/util/jna/RegistryKey.java b/core/src/main/java/hudson/util/jna/RegistryKey.java index 1b8e010ef0..5e1fe398a4 100644 --- a/core/src/main/java/hudson/util/jna/RegistryKey.java +++ b/core/src/main/java/hudson/util/jna/RegistryKey.java @@ -17,7 +17,6 @@ Lesser General Public License for more details. package hudson.util.jna; import com.sun.jna.ptr.IntByReference; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.TreeMap; @@ -90,7 +89,6 @@ public class RegistryKey implements AutoCloseable { return convertBufferToInt(getValue(valueName)); } - @SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage") private byte[] getValue(String valueName) { IntByReference pType, lpcbData; byte[] lpData = new byte[1]; @@ -151,7 +149,6 @@ public class RegistryKey implements AutoCloseable { /** * Does a specified value exist? */ - @SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage") public boolean valueExists(String name) { IntByReference pType, lpcbData; byte[] lpData = new byte[1]; @@ -226,7 +223,6 @@ public class RegistryKey implements AutoCloseable { * * @return TreeMap with name and value pairs */ - @SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage") public TreeMap getValues() { int dwIndex, result; char[] lpValueName;