From b28f403bf8314d27704b789a0eeda11f74aaf886 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 22 Aug 2021 14:45:55 +0200 Subject: [PATCH] Fix Checkstyle violation See gh-27303 --- .../springframework/web/util/UrlPathHelperTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java index 094e33d419fd..e3281e55273f 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java @@ -22,7 +22,7 @@ import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; /** * Unit tests for {@link UrlPathHelper}. @@ -170,16 +170,16 @@ void getLookupPathWithSemicolonContentAndNullPathInfo() { void defaultInstanceReadOnlyBehavior() { UrlPathHelper helper = UrlPathHelper.defaultInstance; - assertThatExceptionOfType(IllegalArgumentException.class) + assertThatIllegalArgumentException() .isThrownBy(() -> helper.setAlwaysUseFullPath(true)) .withMessage("This instance cannot be modified"); - assertThatExceptionOfType(IllegalArgumentException.class) + assertThatIllegalArgumentException() .isThrownBy(() -> helper.setUrlDecode(true)) .withMessage("This instance cannot be modified"); - assertThatExceptionOfType(IllegalArgumentException.class) + assertThatIllegalArgumentException() .isThrownBy(() -> helper.setRemoveSemicolonContent(true)) .withMessage("This instance cannot be modified"); - assertThatExceptionOfType(IllegalArgumentException.class) + assertThatIllegalArgumentException() .isThrownBy(() -> helper.setDefaultEncoding("UTF-8")) .withMessage("This instance cannot be modified");