diff --git a/src/main/java/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder.java b/src/main/java/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder.java index 09812cc2..2e6bb101 100644 --- a/src/main/java/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder.java +++ b/src/main/java/org/jenkinsci/plugins/scriptler/builder/ScriptlerBuilder.java @@ -40,6 +40,7 @@ import org.jenkinsci.plugins.scriptler.util.UIHelper; import org.jenkinsci.plugins.tokenmacro.MacroEvaluationException; import org.jenkinsci.plugins.tokenmacro.TokenMacro; +import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.Stapler; import org.kohsuke.stapler.StaplerRequest; @@ -81,6 +82,7 @@ public ScriptlerBuilder(String builderId, String scriptId, boolean propagatePara this(builderId, scriptId, propagateParams, Arrays.asList(Objects.requireNonNull(parameters))); } + @DataBoundConstructor public ScriptlerBuilder(String builderId, String scriptId, boolean propagateParams, @NonNull List parameters) { this.builderId = builderId; this.scriptId = scriptId; diff --git a/src/main/java/org/jenkinsci/plugins/scriptler/config/Parameter.java b/src/main/java/org/jenkinsci/plugins/scriptler/config/Parameter.java index 55d3cf1c..a360481d 100644 --- a/src/main/java/org/jenkinsci/plugins/scriptler/config/Parameter.java +++ b/src/main/java/org/jenkinsci/plugins/scriptler/config/Parameter.java @@ -1,6 +1,7 @@ package org.jenkinsci.plugins.scriptler.config; import net.sf.json.JSONObject; +import org.kohsuke.stapler.DataBoundConstructor; import java.io.Serializable; import java.util.*; @@ -25,6 +26,7 @@ public Parameter(JSONObject object) { value = object.getString(VALUE); } + @DataBoundConstructor public Parameter(String name, String value) { this.name = name; this.value = value;