From 4d227779c657cc92632cb3207d0eafbf0993271b Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Thu, 30 Dec 2021 08:01:02 -0800 Subject: [PATCH] Suppress `NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD` SpotBugs violation (#6131) --- .../apitoken/LegacyApiTokenAdministrativeMonitor.java | 7 ++++++- src/spotbugs/spotbugs-excludes.xml | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor.java b/core/src/main/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor.java index 18827c94fd..20c9d27e1b 100644 --- a/core/src/main/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor.java +++ b/core/src/main/java/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor.java @@ -161,7 +161,12 @@ public class LegacyApiTokenAdministrativeMonitor extends AdministrativeMonitor { } @RequirePOST - @SuppressFBWarnings(value = "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", justification = "written to by Stapler") + @SuppressFBWarnings( + value = { + "NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", + "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" + }, + justification = "written to by Stapler") public HttpResponse doRevokeAllSelected(@JsonBody RevokeAllSelectedModel content) throws IOException { for (RevokeAllSelectedUserAndUuid value : content.values) { if (value.userId == null) { diff --git a/src/spotbugs/spotbugs-excludes.xml b/src/spotbugs/spotbugs-excludes.xml index fc7dd3f050..ad5db54549 100644 --- a/src/spotbugs/spotbugs-excludes.xml +++ b/src/spotbugs/spotbugs-excludes.xml @@ -216,10 +216,6 @@ - - - -