Skip to content
Permalink
Browse files

[JENKINS-35206] - fix potential NPE due to corrupt Jenkins.InstallSta…

…te (#2385)
  • Loading branch information
kzantow authored and oleg-nenashev committed Jun 3, 2016
1 parent 7a3e43c commit 541641100b4a9570d72d263a12edbc1e06c987a2
@@ -88,10 +88,6 @@ public T get() {
* Proceed to the state following the provided one
*/
public static void proceedToNextStateFrom(InstallState prior) {
InstallState current = Jenkins.getInstance().getInstallState();
if (!current.equals(prior)) {
if (Main.isDevelopmentMode) LOGGER.warning("Transitioning state from: " + prior + ", but current is: " + current);
}
InstallState next = getNextInstallState(prior);
if (Main.isDevelopmentMode) LOGGER.info("Install state tranisitioning from: " + prior + " to: " + next);
if (next != null) {
@@ -953,6 +953,9 @@ private Object readResolve() {
@Nonnull
@Restricted(NoExternalUse.class)
public InstallState getInstallState() {
if (installState == null || installState.name() == null) {
return InstallState.UNKNOWN;
}
return installState;
}

0 comments on commit 5416411

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