From 9e68ced3d099b5ff53d1b436236f05ff48968ca4 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 10 Dec 2021 09:53:22 -0800 Subject: [PATCH] Fix `IS_FIELD_NOT_GUARDED` SpotBugs violation (#6037) --- core/src/main/java/hudson/model/ListView.java | 2 +- src/spotbugs/spotbugs-excludes.xml | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/core/src/main/java/hudson/model/ListView.java b/core/src/main/java/hudson/model/ListView.java index 02946a4e3c..341a59b0e4 100644 --- a/core/src/main/java/hudson/model/ListView.java +++ b/core/src/main/java/hudson/model/ListView.java @@ -185,7 +185,7 @@ public class ListView extends View implements DirectlyModifiableView { return columns; } - public Set getJobNames() { + public synchronized Set getJobNames() { return Collections.unmodifiableSet(jobNames); } diff --git a/src/spotbugs/spotbugs-excludes.xml b/src/spotbugs/spotbugs-excludes.xml index 1dc6ffb966..37058b39df 100644 --- a/src/spotbugs/spotbugs-excludes.xml +++ b/src/spotbugs/spotbugs-excludes.xml @@ -192,13 +192,6 @@ - - - - - - -