diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java index 5c729de95ed..61abf80a6cc 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTestNGTests.java @@ -34,6 +34,7 @@ import org.springframework.test.context.transaction.BeforeTransaction; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; /** * Integration tests which verify that 'before' and 'after' @@ -112,7 +113,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void beforeTestClass(TestContext testContext) { - org.testng.Assert.fail("always failing beforeTestClass()"); + fail("always failing beforeTestClass()"); } } @@ -120,7 +121,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void afterTestClass(TestContext testContext) { - org.testng.Assert.fail("always failing afterTestClass()"); + fail("always failing afterTestClass()"); } } @@ -128,7 +129,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void prepareTestInstance(TestContext testContext) throws Exception { - org.testng.Assert.fail("always failing prepareTestInstance()"); + fail("always failing prepareTestInstance()"); } } @@ -136,7 +137,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void beforeTestMethod(TestContext testContext) { - org.testng.Assert.fail("always failing beforeTestMethod()"); + fail("always failing beforeTestMethod()"); } } @@ -144,7 +145,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void beforeTestExecution(TestContext testContext) { - org.testng.Assert.fail("always failing beforeTestExecution()"); + fail("always failing beforeTestExecution()"); } } @@ -152,7 +153,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void afterTestExecution(TestContext testContext) { - org.testng.Assert.fail("always failing afterTestExecution()"); + fail("always failing afterTestExecution()"); } } @@ -160,7 +161,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @Override public void afterTestMethod(TestContext testContext) { - org.testng.Assert.fail("always failing afterTestMethod()"); + fail("always failing afterTestMethod()"); } } @@ -210,7 +211,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @BeforeTransaction public void beforeTransaction() { - org.testng.Assert.fail("always failing beforeTransaction()"); + fail("always failing beforeTransaction()"); } } @@ -223,7 +224,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests { @AfterTransaction public void afterTransaction() { - org.testng.Assert.fail("always failing afterTransaction()"); + fail("always failing afterTransaction()"); } } diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java index 3ad2305b324..31641b9347d 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.fail; +import static org.assertj.core.api.Assertions.fail; /** * @author Arjen Poutsma @@ -339,7 +339,7 @@ public class Jackson2TokenizerTests extends AbstractLeakCheckingTests { } } catch (IOException ex) { - fail(ex); + fail(ex.getMessage(), ex); } }) .verifyComplete(); diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index a298ea57386..f542605d243 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -233,14 +233,14 @@ - + - + @@ -248,7 +248,7 @@ - +