Skip to content
Browse files
[FIXED JENKINS-16444] NPE showEvenIfUnstableOption when first adding …
…trigger section.

At this time the target project is unset so it has no known type and we just have to assume the threshold is valid.
  • Loading branch information
jglick committed Jan 22, 2013
1 parent 810a395 commit 0bdde83cbb18300d555dda4e7f0ee663f4ad267f
@@ -62,6 +62,9 @@
Improving responsiveness of <b>People</b> page.
(<a href="">issue 16342</a>)
(<a href="">issue 16397</a>)
<li class=bug>
Exception printed to log while adding <b>Build other projects</b> post-build step.
(<a href="">issue 16444</a>)
<li class=bug>
Improved logging and error output from SSHD in Jenkins.
<li class=rfe>
@@ -65,6 +65,7 @@
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;

* Triggers builds of other projects.
@@ -310,9 +311,9 @@ public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;

public boolean showEvenIfUnstableOption(Class<? extends AbstractProject> jobType) {
public boolean showEvenIfUnstableOption(@CheckForNull Class<? extends AbstractProject<?,?>> jobType) {
// UGLY: for promotion process, this option doesn't make sense.
return !jobType.getName().contains("PromotionProcess");
return jobType == null || !jobType.getName().contains("PromotionProcess");

@@ -30,7 +30,7 @@ THE SOFTWARE.
<j:if test="${descriptor.showEvenIfUnstableOption(targetType)}">
<j:if test="${descriptor.showEvenIfUnstableOption(targetType)}"> <!-- XXX JENKINS-16444 this will always be true when first adding step -->
<f:entry title="">
<f:radio name="threshold" checked="${instance.threshold==null || instance.threshold.toString()=='SUCCESS'}"
title="${%Trigger only if build succeeds}" value="SUCCESS"/>

0 comments on commit 0bdde83

Please sign in to comment.