Skip to content

Commit

Permalink
Migrate to EE 9 classes usage
Browse files Browse the repository at this point in the history
  • Loading branch information
alecharp committed Nov 22, 2024
1 parent 8462eb3 commit 9cbdf1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/java/hudson/plugins/s3/S3ArtifactsAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -75,7 +75,7 @@ public List<FingerprintRecord> 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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/s3/S3BucketPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 9cbdf1c

Please sign in to comment.