Skip to content

Commit

Permalink
Merge branch 'JENKINS-73875' of https://github.com/shlomomdahan/workf…
Browse files Browse the repository at this point in the history
…low-job-plugin into JENKINS-73875
  • Loading branch information
shlomomdahan committed Oct 10, 2024
2 parents ce2feb6 + 31c9c88 commit 6474384
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import jakarta.servlet.ServletException;
import jenkins.model.BlockedBecauseOfBuildInProgress;
import jenkins.model.Jenkins;
import jenkins.model.ParameterizedJobMixIn;
Expand All @@ -97,8 +97,8 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import org.kohsuke.stapler.export.Exported;

@SuppressWarnings({"unchecked", "rawtypes"})
Expand Down Expand Up @@ -176,7 +176,7 @@ public void setDefinition(FlowDefinition definition) {
}

@SuppressWarnings("deprecation")
@Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException {
@Override protected void submit(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException, Descriptor.FormException {
super.submit(req, rsp);
JSONObject json = req.getSubmittedForm();
definition = Descriptor.bindJSON(req, FlowDefinition.class, json.getJSONObject("definition"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import org.kohsuke.stapler.WebMethod;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.interceptor.RequirePOST;
Expand Down Expand Up @@ -1128,7 +1128,7 @@ public String getFlowGraphDataAsHtml() {
return new ByteArrayInputStream(baos.toByteArray());
}

@Override public void doConsoleText(StaplerRequest req, StaplerResponse rsp) throws IOException {
@Override public void doConsoleText(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException {
rsp.setContentType("text/plain;charset=UTF-8");
try (OutputStream os = rsp.getOutputStream()) {
writeLogTo(getLogText()::writeLogTo, os);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.jenkinsci.Symbol;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
Expand Down Expand Up @@ -149,7 +149,7 @@ public List<Action> getAllTriggerActions() {

@CheckForNull
@Override
public PipelineTriggersJobProperty reconfigure(@NonNull StaplerRequest req, @CheckForNull JSONObject form) throws Descriptor.FormException {
public PipelineTriggersJobProperty reconfigure(@NonNull StaplerRequest2 req, @CheckForNull JSONObject form) throws Descriptor.FormException {
DescribableList<Trigger<?>, TriggerDescriptor> trigList = new DescribableList<>(Saveable.NOOP);
try {
JSONObject triggerSection = new JSONObject();
Expand Down Expand Up @@ -198,7 +198,7 @@ public String getDisplayName() {
}

@Override
public JobProperty<?> newInstance(StaplerRequest req, JSONObject formData) throws FormException {
public JobProperty<?> newInstance(StaplerRequest2 req, JSONObject formData) throws FormException {
PipelineTriggersJobProperty prop = (PipelineTriggersJobProperty) super.newInstance(req, formData);
return prop.triggers.isEmpty() ? null : prop;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.kohsuke.stapler.HttpResponse;
import org.kohsuke.stapler.HttpResponses;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerResponse2;

/**
* Debugging-only view of the flow graph.
Expand Down Expand Up @@ -79,7 +79,7 @@ public HttpResponse doDot() throws IOException {
}

@SuppressFBWarnings("DM_DEFAULT_ENCODING")
public void doIndex(StaplerResponse rsp) throws IOException {
public void doIndex(StaplerResponse2 rsp) throws IOException {
Process p = new ProcessBuilder("dot", "-Tpng").start();
writeDot(new PrintWriter(p.getOutputStream()));

Expand Down

0 comments on commit 6474384

Please sign in to comment.