Skip to content
Permalink
Browse files

workaround JENKINS-48505 JDK-8184907

  • Loading branch information...
fengxx committed Dec 13, 2017
1 parent 36bd847 commit 10c7ca8fd87a17f68c708e9b49e4b06501d96726
@@ -99,16 +99,14 @@ public SplunkJenkinsInstallation() {
}

public static SplunkJenkinsInstallation get() {
if (cachedConfig != null) {
return cachedConfig;
} else {
if (Jenkins.getInstance() != null && GlobalConfiguration.all() != null) {
return GlobalConfiguration.all().get(SplunkJenkinsInstallation.class);
} else {
//jenkins is in shutdown phase
throw new IllegalStateException("Jenkins has not been started, or was already shut down");
if (cachedConfig == null) {
synchronized (SplunkJenkinsInstallation.class) {
if (cachedConfig == null) {
cachedConfig = (SplunkJenkinsInstallation) Jenkins.getActiveInstance().getDescriptor(SplunkJenkinsInstallation.class);
}
}
}
return cachedConfig;
}

/**

0 comments on commit 10c7ca8

Please sign in to comment.
You can’t perform that action at this time.