Skip to content
Permalink
Browse files

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

…te (#2385)

(cherry picked from commit 5416411)
  • Loading branch information
kzantow authored and olivergondza committed Jun 19, 2016
1 parent d0cc8cd commit 3837f44a6f2621dde0bea59c522cc1e0464b67c2
@@ -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 3837f44

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