Skip to content

Commit 813108a

Browse files
committed
Ensure TestContextManager always tracks after-class exception
This commit fixes a minor bug introduced in 0adc492. Issue: SPR-14447
1 parent 3c14911 commit 813108a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-test/src/main/java/org/springframework/test/context/TestContextManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ public void afterTestClass() throws Exception {
366366
if (logger.isWarnEnabled()) {
367367
logger.warn("Caught exception while allowing TestExecutionListener [" + testExecutionListener +
368368
"] to process 'after class' callback for test class [" + testClass + "]", ex);
369-
if (afterTestClassException == null) {
370-
afterTestClassException = ex;
371-
}
369+
}
370+
if (afterTestClassException == null) {
371+
afterTestClassException = ex;
372372
}
373373
}
374374
}

0 commit comments

Comments
 (0)