From 41b8f13e912434f5c22546c7919e26f72587f1b4 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Mon, 22 Jun 2026 14:08:25 +0100 Subject: [PATCH] Fix checkStyleNoHttp errors See gh-36893 --- .../server/reactive/ReactorUriHelperTests.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ReactorUriHelperTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ReactorUriHelperTests.java index 138b24d5b24..34545a55a5d 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ReactorUriHelperTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ReactorUriHelperTests.java @@ -55,32 +55,32 @@ class ReactorUriHelperTests { @Test void requestUriWithScheme() throws URISyntaxException { - given(nettyRequest.scheme()).willReturn("http"); + given(nettyRequest.scheme()).willReturn("https"); given(nettyRequest.hostName()).willReturn("example.org"); - given(nettyRequest.hostPort()).willReturn(80); - given(nettyRequest.uri()).willReturn("http://example.org/path"); + given(nettyRequest.hostPort()).willReturn(443); + given(nettyRequest.uri()).willReturn("https://example.org/path"); URI uri = ReactorUriHelper.createUri(nettyRequest); - assertThat(uri).hasScheme("http") + assertThat(uri).hasScheme("https") .hasHost("example.org") .hasPort(-1) .hasPath("/path") - .hasToString("http://example.org/path"); + .hasToString("https://example.org/path"); } @Test void requestUriWithoutLeadingSlash() throws URISyntaxException { - given(nettyRequest.scheme()).willReturn("http"); + given(nettyRequest.scheme()).willReturn("https"); given(nettyRequest.hostName()).willReturn("example.org"); - given(nettyRequest.hostPort()).willReturn(80); + given(nettyRequest.hostPort()).willReturn(443); given(nettyRequest.uri()).willReturn("foo/bar"); URI uri = ReactorUriHelper.createUri(nettyRequest); - assertThat(uri).hasScheme("http") + assertThat(uri).hasScheme("https") .hasHost("example.org") .hasPort(-1) .hasPath("/foo/bar") - .hasToString("http://example.org/foo/bar"); + .hasToString("https://example.org/foo/bar"); } @ParameterizedTest(name = "{displayName}({arguments})")