Polishing

This commit is contained in:
Sam Brannen 2023-11-26 12:31:15 +01:00
parent a15f472898
commit b17f3bc07b
1 changed files with 4 additions and 5 deletions

View File

@ -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<? extends Throwable> exceptionType = (Class<? extends Throwable>)
ClassUtils.forName(name, TestContextManager.class.getClassLoader());