Skip to content
Browse files
[FIXED JENKINS-13112] Adding any post-build step as a build step caus…
…es exception
  • Loading branch information
imod committed Mar 31, 2012
1 parent e51b3ad commit a13c4d9bc48e48557a76c379560ad9751af15b1d
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/org/jenkinsci/plugins/conditionalbuildstep/
@@ -34,6 +34,7 @@
import hudson.tasks.BuildStep;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.tasks.Publisher;

import java.util.ArrayList;
@@ -135,7 +136,12 @@ public boolean configure(StaplerRequest req, JSONObject formData) throws FormExc
public Builder newInstance(StaplerRequest req, JSONObject formData) throws hudson.model.Descriptor.FormException {
ConditionalBuilder instance = req.bindJSON(ConditionalBuilder.class, formData);
instance.conditionalbuilders = Descriptor.newInstancesFromHeteroList(req, formData, "conditionalbuilders", Builder.all());
if (formData.opt("conditionalbuilders") != null) {
final List all = new ArrayList(Builder.all());
// as Any Build step also allows publishers to be used, we have to pass the publisher descriptors too...
instance.conditionalbuilders = Descriptor.newInstancesFromHeteroList(req, formData, "conditionalbuilders", all);
return instance;

0 comments on commit a13c4d9

Please sign in to comment.