[JENKINS-33414] Cover one final theoretical race condition

This commit is contained in:
Stephen Connolly committed 2016-03-09 14:42:03 +00:00
1 parent ef2451b8c8
commit 21f1c29c89
1 file changed
+3 -1
@@ -275,7 +275,9 @@ public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfi
@CheckForNull
private static ProxyConfiguration _get() {
JenkinsJVM.checkJenkinsJVM();
return Jenkins.getInstance().proxy;
// this code could be called between the JVM flag being set and theInstance initialized
Jenkins jenkins = Jenkins.getInstance();
return jenkins == null ? null : jenkins.proxy;
}
private static void decorate(URLConnection con) throws IOException {