diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java index bc05f413..1aaf8406 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java @@ -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; @@ -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"}) @@ -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")); diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java index 199daa3c..6ffe06c5 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java @@ -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; @@ -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); diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/properties/PipelineTriggersJobProperty.java b/src/main/java/org/jenkinsci/plugins/workflow/job/properties/PipelineTriggersJobProperty.java index 13cac746..d31a8e9a 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/properties/PipelineTriggersJobProperty.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/properties/PipelineTriggersJobProperty.java @@ -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; @@ -149,7 +149,7 @@ public List 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, TriggerDescriptor> trigList = new DescribableList<>(Saveable.NOOP); try { JSONObject triggerSection = new JSONObject(); @@ -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; } diff --git a/src/main/java/org/jenkinsci/plugins/workflow/job/views/GraphVizAction.java b/src/main/java/org/jenkinsci/plugins/workflow/job/views/GraphVizAction.java index d6c6a080..80fa61c0 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/job/views/GraphVizAction.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/job/views/GraphVizAction.java @@ -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. @@ -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()));