diff --git a/framework-platform/framework-platform.gradle b/framework-platform/framework-platform.gradle index bf84527bfd2..f5ed4d63f14 100644 --- a/framework-platform/framework-platform.gradle +++ b/framework-platform/framework-platform.gradle @@ -137,7 +137,7 @@ dependencies { api("org.reactivestreams:reactive-streams:1.0.4") api("org.seleniumhq.selenium:htmlunit3-driver:4.36.1") api("org.seleniumhq.selenium:selenium-java:4.36.0") - api("org.skyscreamer:jsonassert:2.0-rc1") + api("org.skyscreamer:jsonassert:1.5.3") api("org.testng:testng:7.11.0") api("org.webjars:underscorejs:1.8.3") api("org.webjars:webjars-locator-lite:1.1.0") diff --git a/spring-web/src/test/java/org/springframework/http/converter/json/ProblemDetailJacksonMixinTests.java b/spring-web/src/test/java/org/springframework/http/converter/json/ProblemDetailJacksonMixinTests.java index 4096c051d81..b0f82157d37 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/json/ProblemDetailJacksonMixinTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/json/ProblemDetailJacksonMixinTests.java @@ -18,6 +18,7 @@ package org.springframework.http.converter.json; import java.net.URI; +import org.json.JSONException; import org.junit.jupiter.api.Test; import org.skyscreamer.jsonassert.JSONAssert; import tools.jackson.databind.ObjectMapper; @@ -42,7 +43,7 @@ class ProblemDetailJacksonMixinTests { @Test - void writeStatusAndHeaders() { + void writeStatusAndHeaders() throws Exception { ProblemDetail detail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, "Missing header"); testWrite(detail, """ @@ -54,7 +55,7 @@ class ProblemDetailJacksonMixinTests { } @Test - void writeCustomProperty() { + void writeCustomProperty() throws Exception { ProblemDetail detail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, "Missing header"); detail.setProperty("host", "abc.org"); detail.setProperty("user", null); @@ -109,7 +110,7 @@ class ProblemDetailJacksonMixinTests { assertThat(detail.getProperties()).containsEntry("host", "abc.org"); } - private void testWrite(ProblemDetail problemDetail, String expected) { + private void testWrite(ProblemDetail problemDetail, String expected) throws JSONException { String output = this.mapper.writeValueAsString(problemDetail); JSONAssert.assertEquals(expected, output, false); }