From b17f3bc07b69ab70378f29e50e8b4539e9d4121c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 26 Nov 2023 12:31:15 +0100 Subject: [PATCH] Polishing --- .../springframework/test/context/TestContextManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java index 6cd0480059..b53d8e6991 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java @@ -96,11 +96,11 @@ public class TestContextManager { static { // JUnit Jupiter - loadSkippedExceptionType("org.opentest4j.TestAbortedException"); + registerSkippedExceptionType("org.opentest4j.TestAbortedException"); // JUnit 4 - loadSkippedExceptionType("org.junit.AssumptionViolatedException"); + registerSkippedExceptionType("org.junit.AssumptionViolatedException"); // TestNG - loadSkippedExceptionType("org.testng.SkipException"); + registerSkippedExceptionType("org.testng.SkipException"); } private final TestContext testContext; @@ -664,8 +664,7 @@ public class TestContextManager { } @SuppressWarnings("unchecked") - @Nullable - private static void loadSkippedExceptionType(String name) { + private static void registerSkippedExceptionType(String name) { try { Class exceptionType = (Class) ClassUtils.forName(name, TestContextManager.class.getClassLoader());