From 1cd0a688e0c90d907606b2ae35e6cbae5fb0b5f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 04:49:48 +0000 Subject: [PATCH 1/3] Bump spring-boot.version from 3.2.3 to 3.3.4 Bumps `spring-boot.version` from 3.2.3 to 3.3.4. Updates `org.springframework.boot:spring-boot-starter-web` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-starter-undertow` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-starter-test` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-starter-webflux` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-dependencies` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-autoconfigure` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) Updates `org.springframework.boot:spring-boot-configuration-processor` from 3.2.3 to 3.3.4 - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](https://github.com/spring-projects/spring-boot/compare/v3.2.3...v3.3.4) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-web dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-starter-undertow dependency-type: direct:development update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-starter-test dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-starter-webflux dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-dependencies dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-autoconfigure dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.springframework.boot:spring-boot-configuration-processor dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- logbook-parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logbook-parent/pom.xml b/logbook-parent/pom.xml index 7f6bc5b71..43e33976a 100644 --- a/logbook-parent/pom.xml +++ b/logbook-parent/pom.xml @@ -38,7 +38,7 @@ 13.2.1 6.1.12 - 3.2.3 + 3.3.4 5.10.2 5.1.1 From c62f7e0e0e6b8a2f73f204d5af1b6c88fd7d17c2 Mon Sep 17 00:00:00 2001 From: Karen Asmarian Date: Fri, 20 Sep 2024 15:03:34 +0200 Subject: [PATCH 2/3] update the MultiFilterTest and bump logback versions --- logbook-parent/pom.xml | 4 ++-- .../org/zalando/logbook/servlet/MultiFilterTest.java | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/logbook-parent/pom.xml b/logbook-parent/pom.xml index 43e33976a..e7d66c9dd 100644 --- a/logbook-parent/pom.xml +++ b/logbook-parent/pom.xml @@ -44,8 +44,8 @@ 5.1.1 1.37 1.18.32 - 1.5.6 - 1.4.14 + 1.5.8 + 1.5.8 3.14.0 3.9.1 diff --git a/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java b/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java index adb4aba46..592f235cf 100644 --- a/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java +++ b/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java @@ -2,6 +2,8 @@ import jakarta.servlet.Filter; import jakarta.servlet.ServletException; +import jakarta.servlet.ServletResponseWrapper; +import jakarta.servlet.http.HttpServletResponse; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -106,10 +108,10 @@ void shouldBufferResponseTwice() throws Exception { .content("Hello, world!")).andReturn(); final LocalResponse firstResponse = getResponse(lastFilter); - final LocalResponse secondResponse = getResponse(controller); + final HttpServletResponse secondResponse = getResponse(controller); assertThat(firstResponse.getBody()).isNotEmpty(); - assertThat(secondResponse.getBody()).isNotEmpty(); + assertThat(((LocalResponse)((ServletResponseWrapper)secondResponse).getResponse()).getBody()).isNotEmpty(); } private RemoteRequest getRequest(final Filter filter) throws IOException, ServletException { @@ -130,8 +132,8 @@ private LocalResponse getResponse(final Filter filter) throws IOException, Servl return captor.getValue(); } - private LocalResponse getResponse(final ExampleController controller) throws IOException { - final ArgumentCaptor captor = ArgumentCaptor.forClass(LocalResponse.class); + private HttpServletResponse getResponse(final ExampleController controller) throws IOException { + final ArgumentCaptor captor = ArgumentCaptor.forClass(HttpServletResponse.class); verify(controller).readBytes(any(), captor.capture()); return captor.getValue(); } From 07396d7fcc32c86337327df108e0e0f9b6083a67 Mon Sep 17 00:00:00 2001 From: Karen Asmarian Date: Mon, 23 Sep 2024 09:51:06 +0200 Subject: [PATCH 3/3] cast to LocalResponse in getResponse --- .../zalando/logbook/servlet/MultiFilterTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java b/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java index 592f235cf..e0d23c2d2 100644 --- a/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java +++ b/logbook-servlet/src/test/java/org/zalando/logbook/servlet/MultiFilterTest.java @@ -2,8 +2,7 @@ import jakarta.servlet.Filter; import jakarta.servlet.ServletException; -import jakarta.servlet.ServletResponseWrapper; -import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponseWrapper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -108,10 +107,10 @@ void shouldBufferResponseTwice() throws Exception { .content("Hello, world!")).andReturn(); final LocalResponse firstResponse = getResponse(lastFilter); - final HttpServletResponse secondResponse = getResponse(controller); + final LocalResponse secondResponse = getResponse(controller); assertThat(firstResponse.getBody()).isNotEmpty(); - assertThat(((LocalResponse)((ServletResponseWrapper)secondResponse).getResponse()).getBody()).isNotEmpty(); + assertThat(secondResponse.getBody()).isNotEmpty(); } private RemoteRequest getRequest(final Filter filter) throws IOException, ServletException { @@ -132,10 +131,10 @@ private LocalResponse getResponse(final Filter filter) throws IOException, Servl return captor.getValue(); } - private HttpServletResponse getResponse(final ExampleController controller) throws IOException { - final ArgumentCaptor captor = ArgumentCaptor.forClass(HttpServletResponse.class); + private LocalResponse getResponse(final ExampleController controller) throws IOException { + final ArgumentCaptor captor = ArgumentCaptor.forClass(HttpServletResponseWrapper.class); verify(controller).readBytes(any(), captor.capture()); - return captor.getValue(); + return (LocalResponse) captor.getValue().getResponse(); } }