Return error when invalid string is passed as a Run status CLI argument (#4212)

* removed redundnat null checks of nonnull values

* integrated suggestions

* removed local jenkins variable as suggested

* replaced null check with check for error object
This commit is contained in:
StefanSpieker authored and Oleg Nenashev committed 2020-01-03 23:39:22 +01:00
1 parent 9b8047acd1
commit 0e6bb91864
5 files changed
+6 -8

No files matched your search

@@ -380,7 +380,7 @@ public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfi
private static ProxyConfiguration _get() {
JenkinsJVM.checkJenkinsJVM();
// this code could be called between the JVM flag being set and theInstance initialized
Jenkins jenkins = Jenkins.get();
Jenkins jenkins = Jenkins.getInstanceOrNull();
return jenkins == null ? null : jenkins.proxy;
}