From 5f8c16e71f9faa8343d98c654c537980bcf2f788 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 18 Jun 2024 16:07:14 -0700 Subject: [PATCH] [JENKINS-73312] Adapt GitHub API for Jetty 12 (EE 9) --- pom.xml | 10 ++++++++-- .../jenkins/plugins/github/api/mock/MockGitHub.java | 10 +++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 7594460..4a5b788 100644 --- a/pom.xml +++ b/pom.xml @@ -25,8 +25,8 @@ 1.321 999999-SNAPSHOT - - 2.464-rc35068.0fff405a_c344 + + 2.464-rc35069.54d5e6a_108a_0 jenkinsci/${project.artifactId}-plugin false @@ -111,6 +111,12 @@ import pom + + + jakarta.servlet + jakarta.servlet-api + 5.0.0 + diff --git a/src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java b/src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java index 35cea02..ffefd55 100644 --- a/src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java +++ b/src/test/java/jenkins/plugins/github/api/mock/MockGitHub.java @@ -22,18 +22,18 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; -import org.eclipse.jetty.ee8.servlet.ServletContextHandler; +import org.eclipse.jetty.ee9.servlet.ServletContextHandler; import org.jvnet.hudson.test.ThreadPoolImpl; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.Stapler; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.StaplerRequest2; +import org.kohsuke.stapler.StaplerResponse2; public class MockGitHub implements Closeable { private AtomicLong nextId = new AtomicLong(); @@ -178,7 +178,7 @@ public List> owners() { public HttpResponse doRepositories(final @QueryParameter long since) { return new HttpResponse() { @Override - public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) + public void generateResponse(StaplerRequest2 req, StaplerResponse2 rsp, Object node) throws IOException, ServletException { List repositories = new ArrayList<>(); for (MockOwner o : owners()) {