Skip to content

Commit

Permalink
[FIXED JENKINS-12414] NullPointerException when running Conditional s…
Browse files Browse the repository at this point in the history
…tep (single) with Run Condition set to "Current build status" in an empty project

If no build result has been set, then the build is currently a successful
  • Loading branch information
bap2000 committed Jan 14, 2012
1 parent ff4e00f commit 9c9e0ba
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -67,7 +67,7 @@ public Result getWorstResult() {

@Override
public boolean runPerform(final AbstractBuild<?, ?> build, final BuildListener listener) {
final Result currentStatus = build.getResult();
final Result currentStatus = build.getResult() == null ? Result.SUCCESS : build.getResult();
return worstResult.isWorseOrEqualTo(currentStatus) && bestResult.isBetterOrEqualTo(currentStatus);
}

Expand Down

0 comments on commit 9c9e0ba

Please sign in to comment.