diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index e0918ef219..e331a9e0c1 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -815,6 +815,7 @@ public abstract class Run ,RunT extends Run & Queue.Task & if (r == null) { // having two neighbors pointing to each other is important to make RunMap.removeValue work - JobT _parent = asRun().getParent(); - if (_parent == null) { - throw new IllegalStateException("no parent for " + asRun().number); - } + JobT _parent = Objects.requireNonNull(asRun().getParent(), "no parent for " + asRun().number); RunT pb = _parent.getLazyBuildMixIn()._getRuns().search(asRun().number - 1, AbstractLazyLoadRunMap.Direction.DESC); if (pb != null) { pb.getRunMixIn().nextBuildR = createReference(); // establish bi-di link diff --git a/src/spotbugs/spotbugs-excludes.xml b/src/spotbugs/spotbugs-excludes.xml index bd29bee8d5..f93a6bb253 100644 --- a/src/spotbugs/spotbugs-excludes.xml +++ b/src/spotbugs/spotbugs-excludes.xml @@ -489,12 +489,7 @@ - - - - - - +