From bfa6ef15b448b3cd69d935ef642f2d9e9def5fb3 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 18:07:08 +0530 Subject: [PATCH 1/9] BEE-72087: Replace rest-assured with Java HttpClient to fix Java 25 PCT failures rest-assured:5.3.2 transitively pulls in groovy:4.0.11 which introduces asmResolving=true as the default class resolution strategy. When tests run on Java 25, GroovyClassLoader compiles WorkflowScript at major version 69 at runtime. ASM 9.5 (in groovy:4.0.11) supports up to version 64, causing: IllegalArgumentException: Unsupported class file major version 69 rest-assured was only used in GitHubWebHookFullTest for plain HTTP request/response assertions. Replace it with java.net.http.HttpClient (built-in since Java 11) to eliminate the transitive groovy:4.0.11 dependency entirely. Co-Authored-By: Claude Sonnet 4.6 --- pom.xml | 15 +- .../jenkins/GitHubWebHookFullTest.java | 169 ++++++++---------- 2 files changed, 79 insertions(+), 105 deletions(-) diff --git a/pom.xml b/pom.xml index dbb1f3bff..fae4bfa20 100755 --- a/pom.xml +++ b/pom.xml @@ -128,14 +128,7 @@ - - - org.jenkins-ci.plugins - apache-httpcomponents-client-4-api - test - - - + org.mockito mockito-core test @@ -190,12 +183,6 @@ test - - io.rest-assured - rest-assured - 5.3.2 - test - diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index 7c66858f3..cd0c8a620 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -1,10 +1,6 @@ package com.cloudbees.jenkins; import com.google.common.base.Charsets; -import com.google.common.net.HttpHeaders; -import io.restassured.builder.RequestSpecBuilder; -import io.restassured.http.Header; -import io.restassured.specification.RequestSpecification; import jakarta.inject.Inject; import org.apache.commons.io.IOUtils; import org.jenkinsci.plugins.github.config.GitHubPluginConfig; @@ -18,20 +14,25 @@ import java.io.File; import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; -import static io.restassured.RestAssured.given; -import static io.restassured.config.EncoderConfig.encoderConfig; -import static io.restassured.config.RestAssuredConfig.newConfig; import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST; import static jakarta.servlet.http.HttpServletResponse.SC_METHOD_NOT_ALLOWED; import static jakarta.servlet.http.HttpServletResponse.SC_OK; import static java.lang.String.format; import static org.apache.commons.lang3.ClassUtils.PACKAGE_SEPARATOR; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.jenkinsci.plugins.github.test.HookSecretHelper.removeSecretIn; import static org.jenkinsci.plugins.github.test.HookSecretHelper.storeSecretIn; -import static org.jenkinsci.plugins.github.webhook.RequirePostWithGHHookPayload.Processor.*; +import static org.jenkinsci.plugins.github.webhook.RequirePostWithGHHookPayload.Processor.SHA256_PREFIX; +import static org.jenkinsci.plugins.github.webhook.RequirePostWithGHHookPayload.Processor.SIGNATURE_HEADER; +import static org.jenkinsci.plugins.github.webhook.RequirePostWithGHHookPayload.Processor.SIGNATURE_HEADER_SHA256; /** * @author lanwen (Merkushev Kirill) @@ -39,47 +40,35 @@ @WithJenkins public class GitHubWebHookFullTest { - // GitHub doesn't send the charset per docs, so re-use the exact content-type from the handler public static final String APPLICATION_JSON = GHEventPayload.PayloadHandler.APPLICATION_JSON; public static final String FORM = GHEventPayload.PayloadHandler.FORM_URLENCODED; - public static final Header JSON_CONTENT_TYPE = new Header(HttpHeaders.CONTENT_TYPE, APPLICATION_JSON); - public static final Header FORM_CONTENT_TYPE = new Header(HttpHeaders.CONTENT_TYPE, FORM); - public static final String NOT_NULL_VALUE = "nonnull"; - - private RequestSpecification spec; - @Inject private GitHubPluginConfig config; private JenkinsRule jenkins; + private HttpClient httpClient; @BeforeEach void before(JenkinsRule rule) throws Throwable { jenkins = rule; jenkins.getInstance().getInjector().injectMembers(this); - - spec = new RequestSpecBuilder() - .setConfig(newConfig() - .encoderConfig(encoderConfig() - .defaultContentCharset(Charsets.UTF_8.name()) - // GitHub doesn't add charsets, so don't test with them - .appendDefaultContentCharsetToContentTypeIfUndefined(false))) - .build(); + httpClient = HttpClient.newHttpClient(); } @Test void shouldParseJsonWebHookFromGH() throws Exception { removeSecretIn(config); - given().spec(spec) - .header(eventHeader(GHEvent.PUSH)) - .header(JSON_CONTENT_TYPE) - .body(classpath("payloads/push.json")) - .log().all() - .expect().log().all().statusCode(SC_OK).request().post(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.ofString(classpath("payloads/push.json"))) + .header("Content-Type", APPLICATION_JSON) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_OK)); } - @Test void shouldParseJsonWebHookFromGHWithSignHeader() throws Exception { String hash = "355e155fc3d10c4e5f2c6086a01281d2e947d932"; @@ -87,89 +76,91 @@ void shouldParseJsonWebHookFromGHWithSignHeader() throws Exception { String secret = "123"; storeSecretIn(config, secret); - given().spec(spec) - .header(eventHeader(GHEvent.PUSH)) - .header(JSON_CONTENT_TYPE) - .header(SIGNATURE_HEADER, format("sha1=%s", hash)) - .header(SIGNATURE_HEADER_SHA256, format("%s%s", SHA256_PREFIX, hash256)) - .body(classpath(String.format("payloads/ping_hash_%s_secret_%s.json", hash, secret))) - .log().all() - .expect().log().all().statusCode(SC_OK).request().post(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.ofString( + classpath(format("payloads/ping_hash_%s_secret_%s.json", hash, secret)))) + .header("Content-Type", APPLICATION_JSON) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .header(SIGNATURE_HEADER, format("sha1=%s", hash)) + .header(SIGNATURE_HEADER_SHA256, format("%s%s", SHA256_PREFIX, hash256)) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_OK)); } @Test void shouldParseFormWebHookOrServiceHookFromGH() throws Exception { - given().spec(spec) - .header(eventHeader(GHEvent.PUSH)) - .header(FORM_CONTENT_TYPE) - .formParam("payload", classpath("payloads/push.json")) - .log().all() - .expect().log().all().statusCode(SC_OK).request().post(getPath()); + String encoded = "payload=" + java.net.URLEncoder.encode(classpath("payloads/push.json"), "UTF-8"); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.ofString(encoded)) + .header("Content-Type", FORM) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_OK)); } @Test void shouldParsePingFromGH() throws Exception { - given().spec(spec) - .header(eventHeader(GHEvent.PING)) - .header(JSON_CONTENT_TYPE) - .body(classpath("payloads/ping.json")) - .log().all() - .expect().log().all() - .statusCode(SC_OK) - .request() - .post(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.ofString(classpath("payloads/ping.json"))) + .header("Content-Type", APPLICATION_JSON) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PING.name().toLowerCase()) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_OK)); } @Test void shouldReturnErrOnEmptyPayloadAndHeader() throws Exception { - given().spec(spec) - .log().all() - .expect().log().all() - .statusCode(SC_BAD_REQUEST) - .body(containsString("Hook should contain event type")) - .request() - .post(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.noBody()) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_BAD_REQUEST)); + assertThat("body", response.body(), containsString("Hook should contain event type")); } @Test void shouldReturnErrOnEmptyPayload() throws Exception { - given().spec(spec) - .header(eventHeader(GHEvent.PUSH)) - .log().all() - .expect().log().all() - .statusCode(SC_BAD_REQUEST) - .body(containsString("Hook should contain payload")) - .request() - .post(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.noBody()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_BAD_REQUEST)); + assertThat("body", response.body(), containsString("Hook should contain payload")); } @Test void shouldReturnErrOnGetReq() throws Exception { - given().spec(spec) - .log().all().expect().log().all() - .statusCode(SC_METHOD_NOT_ALLOWED) - .request() - .get(getPath()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .GET() + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_METHOD_NOT_ALLOWED)); } @Test void shouldProcessSelfTest() throws Exception { - given().spec(spec) - .header(new Header(GitHubWebHook.URL_VALIDATION_HEADER, NOT_NULL_VALUE)) - .log().all() - .expect().log().all() - .statusCode(SC_OK) - .header(GitHubWebHook.X_INSTANCE_IDENTITY, notNullValue()) - .request() - .post(getPath()); - } - - public Header eventHeader(GHEvent event) { - return eventHeader(event.name().toLowerCase()); + HttpResponse response = httpClient.send( + HttpRequest.newBuilder(URI.create(getPath())) + .POST(HttpRequest.BodyPublishers.noBody()) + .header(GitHubWebHook.URL_VALIDATION_HEADER, "nonnull") + .build(), + HttpResponse.BodyHandlers.ofString()); + assertThat("status", response.statusCode(), is(SC_OK)); + assertThat("identity header", response.headers().firstValue(GitHubWebHook.X_INSTANCE_IDENTITY).orElse(null), notNullValue()); } - public Header eventHeader(String event) { - return new Header(GHEventHeader.PayloadHandler.EVENT_HEADER, event); + private String getPath() { + return jenkins.getInstance().getRootUrl() + GitHubWebHook.URLNAME.concat("/"); } public static String classpath(String path) { @@ -185,8 +176,4 @@ public static String classpath(Class clazz, String path) { throw new RuntimeException(format("Can't load %s for class %s", path, clazz), e); } } - - private String getPath(){ - return jenkins.getInstance().getRootUrl() + GitHubWebHook.URLNAME.concat("/"); - } } From 534ea75b13878f0d48a3881cc1e6016d3b3c197d Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 18:32:46 +0530 Subject: [PATCH 2/9] Test with Java 25 By analogy to #368, bump CI configurations to test on Java 25 (Linux) and Java 21 (Windows) to prove Java 25 compatibility. Co-Authored-By: Claude Sonnet 4.6 --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 739042f72..0ef6cbfd0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,4 @@ buildPlugin(useContainerAgent: true, configurations: [ - [platform: 'linux', jdk: 21], - [platform: 'windows', jdk: 17], + [platform: 'linux', jdk: 25], + [platform: 'windows', jdk: 21], ]) From 42042ef8a72d595ffd71c7b6aa3d519a30aff6c0 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 19:34:25 +0530 Subject: [PATCH 3/9] Fixing indentation --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fae4bfa20..f714b1766 100755 --- a/pom.xml +++ b/pom.xml @@ -128,7 +128,7 @@ - + org.mockito mockito-core test From 04ffa003d2bd37a49ffc0dba01118a02a118e35b Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 19:52:15 +0530 Subject: [PATCH 4/9] removoing depricated apis --- .../java/com/cloudbees/jenkins/GitHubWebHookFullTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index cd0c8a620..1adecfc20 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -15,9 +15,11 @@ import java.io.File; import java.io.IOException; import java.net.URI; +import java.net.URLEncoder; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; +import java.nio.charset.StandardCharsets; import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST; import static jakarta.servlet.http.HttpServletResponse.SC_METHOD_NOT_ALLOWED; @@ -91,7 +93,7 @@ void shouldParseJsonWebHookFromGHWithSignHeader() throws Exception { @Test void shouldParseFormWebHookOrServiceHookFromGH() throws Exception { - String encoded = "payload=" + java.net.URLEncoder.encode(classpath("payloads/push.json"), "UTF-8"); + String encoded = "payload=" + URLEncoder.encode(classpath("payloads/push.json"), StandardCharsets.UTF_8); HttpResponse response = httpClient.send( HttpRequest.newBuilder(URI.create(getPath())) .POST(HttpRequest.BodyPublishers.ofString(encoded)) From d2eb421086f087f3c2fc6d61375f32a2b8b7edf2 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 20:47:45 +0530 Subject: [PATCH 5/9] adding close for HttpClinet --- .../java/com/cloudbees/jenkins/GitHubWebHookFullTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index 1adecfc20..505930b15 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -6,6 +6,7 @@ import org.jenkinsci.plugins.github.config.GitHubPluginConfig; import org.jenkinsci.plugins.github.webhook.GHEventHeader; import org.jenkinsci.plugins.github.webhook.GHEventPayload; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.jvnet.hudson.test.JenkinsRule; @@ -51,6 +52,13 @@ public class GitHubWebHookFullTest { private JenkinsRule jenkins; private HttpClient httpClient; + @AfterEach + void after() throws Exception { + if (httpClient instanceof AutoCloseable closeable) { + closeable.close(); + } + } + @BeforeEach void before(JenkinsRule rule) throws Throwable { jenkins = rule; From 39fb2ac26aca0b590ade742e3aa0a07365d88b29 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 20:51:02 +0530 Subject: [PATCH 6/9] reformating code --- .../cloudbees/jenkins/GitHubWebHookFullTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index 505930b15..62407c465 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -52,13 +52,6 @@ public class GitHubWebHookFullTest { private JenkinsRule jenkins; private HttpClient httpClient; - @AfterEach - void after() throws Exception { - if (httpClient instanceof AutoCloseable closeable) { - closeable.close(); - } - } - @BeforeEach void before(JenkinsRule rule) throws Throwable { jenkins = rule; @@ -66,6 +59,13 @@ void before(JenkinsRule rule) throws Throwable { httpClient = HttpClient.newHttpClient(); } + @AfterEach + void after() throws Exception { + if (httpClient instanceof AutoCloseable closeable) { + closeable.close(); + } + } + @Test void shouldParseJsonWebHookFromGH() throws Exception { removeSecretIn(config); From ba7d77f4d3875b5cc374c28f73b1366a4e542cfb Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 21:00:34 +0530 Subject: [PATCH 7/9] httpClient instanceof AutoCloseable closeable casting to object --- src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index 62407c465..bcc28a65d 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -61,7 +61,7 @@ void before(JenkinsRule rule) throws Throwable { @AfterEach void after() throws Exception { - if (httpClient instanceof AutoCloseable closeable) { + if ((Object) httpClient instanceof AutoCloseable closeable) { // TODO: replace with httpClient.close() once jenkins.baseline is Java 21+ closeable.close(); } } From e5001a2c651ccb955292c694e9a7317e28cfe032 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Mon, 1 Jun 2026 21:17:49 +0530 Subject: [PATCH 8/9] Restore comment explaining why APPLICATION_JSON has no charset suffix Co-Authored-By: Claude Sonnet 4.6 --- .../com/cloudbees/jenkins/GitHubWebHookFullTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java index bcc28a65d..0a5de344e 100644 --- a/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java +++ b/src/test/java/com/cloudbees/jenkins/GitHubWebHookFullTest.java @@ -16,6 +16,7 @@ import java.io.File; import java.io.IOException; import java.net.URI; +import java.util.Locale; import java.net.URLEncoder; import java.net.http.HttpClient; import java.net.http.HttpRequest; @@ -43,6 +44,7 @@ @WithJenkins public class GitHubWebHookFullTest { + // GitHub doesn't send the charset per docs, so re-use the exact content-type from the handler public static final String APPLICATION_JSON = GHEventPayload.PayloadHandler.APPLICATION_JSON; public static final String FORM = GHEventPayload.PayloadHandler.FORM_URLENCODED; @@ -73,7 +75,7 @@ void shouldParseJsonWebHookFromGH() throws Exception { HttpRequest.newBuilder(URI.create(getPath())) .POST(HttpRequest.BodyPublishers.ofString(classpath("payloads/push.json"))) .header("Content-Type", APPLICATION_JSON) - .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase(Locale.ROOT)) .build(), HttpResponse.BodyHandlers.ofString()); assertThat("status", response.statusCode(), is(SC_OK)); @@ -91,7 +93,7 @@ void shouldParseJsonWebHookFromGHWithSignHeader() throws Exception { .POST(HttpRequest.BodyPublishers.ofString( classpath(format("payloads/ping_hash_%s_secret_%s.json", hash, secret)))) .header("Content-Type", APPLICATION_JSON) - .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase(Locale.ROOT)) .header(SIGNATURE_HEADER, format("sha1=%s", hash)) .header(SIGNATURE_HEADER_SHA256, format("%s%s", SHA256_PREFIX, hash256)) .build(), @@ -106,7 +108,7 @@ void shouldParseFormWebHookOrServiceHookFromGH() throws Exception { HttpRequest.newBuilder(URI.create(getPath())) .POST(HttpRequest.BodyPublishers.ofString(encoded)) .header("Content-Type", FORM) - .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase(Locale.ROOT)) .build(), HttpResponse.BodyHandlers.ofString()); assertThat("status", response.statusCode(), is(SC_OK)); @@ -118,7 +120,7 @@ void shouldParsePingFromGH() throws Exception { HttpRequest.newBuilder(URI.create(getPath())) .POST(HttpRequest.BodyPublishers.ofString(classpath("payloads/ping.json"))) .header("Content-Type", APPLICATION_JSON) - .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PING.name().toLowerCase()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PING.name().toLowerCase(Locale.ROOT)) .build(), HttpResponse.BodyHandlers.ofString()); assertThat("status", response.statusCode(), is(SC_OK)); @@ -140,7 +142,7 @@ void shouldReturnErrOnEmptyPayload() throws Exception { HttpResponse response = httpClient.send( HttpRequest.newBuilder(URI.create(getPath())) .POST(HttpRequest.BodyPublishers.noBody()) - .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase()) + .header(GHEventHeader.PayloadHandler.EVENT_HEADER, GHEvent.PUSH.name().toLowerCase(Locale.ROOT)) .build(), HttpResponse.BodyHandlers.ofString()); assertThat("status", response.statusCode(), is(SC_BAD_REQUEST)); From 8df1e61582863a457cbcde2c8256749750cf8be8 Mon Sep 17 00:00:00 2001 From: nevingeorgesunny Date: Tue, 2 Jun 2026 09:03:30 +0530 Subject: [PATCH 9/9] empty commit to re trigger build