diff --git a/src/main/java/hudson/plugins/s3/S3ArtifactsAction.java b/src/main/java/hudson/plugins/s3/S3ArtifactsAction.java index cacdcab1..5a84f491 100644 --- a/src/main/java/hudson/plugins/s3/S3ArtifactsAction.java +++ b/src/main/java/hudson/plugins/s3/S3ArtifactsAction.java @@ -7,21 +7,21 @@ import java.util.Date; import java.util.List; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.GeneratePresignedUrlRequest; import com.amazonaws.services.s3.model.ResponseHeaderOverrides; import hudson.Functions; import jenkins.model.RunAction2; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.StaplerRequest2; +import org.kohsuke.stapler.StaplerResponse2; import hudson.model.Run; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; -import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; +import static jakarta.servlet.http.HttpServletResponse.SC_NOT_FOUND; @ExportedBean public class S3ArtifactsAction implements RunAction2 { @@ -75,7 +75,7 @@ public List getArtifacts() { return artifacts; } - public void doDownload(final StaplerRequest request, final StaplerResponse response) throws IOException, ServletException { + public void doDownload(final StaplerRequest2 request, final StaplerResponse2 response) throws IOException, ServletException { if (Functions.isArtifactsPermissionEnabled()) { build.getParent().checkPermission(Run.ARTIFACTS); } diff --git a/src/main/java/hudson/plugins/s3/S3BucketPublisher.java b/src/main/java/hudson/plugins/s3/S3BucketPublisher.java index 476bab90..87174135 100644 --- a/src/main/java/hudson/plugins/s3/S3BucketPublisher.java +++ b/src/main/java/hudson/plugins/s3/S3BucketPublisher.java @@ -40,7 +40,7 @@ import org.kohsuke.stapler.AncestorInPath; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; -import org.kohsuke.stapler.StaplerRequest; +import org.kohsuke.stapler.StaplerRequest2; import org.kohsuke.stapler.interceptor.RequirePOST; import java.io.IOException; @@ -483,7 +483,7 @@ public String getHelpFile() { } @Override - public boolean configure(StaplerRequest req, JSONObject json) { + public boolean configure(StaplerRequest2 req, JSONObject json) { final JSONArray array = json.optJSONArray("profile"); if (array != null) { profiles.replaceBy(req.bindJSONToList(S3Profile.class, array));