Consistently log Class.getName() instead of Class.toString(), avoiding double class term in log message

Issue: SPR-11804
This commit is contained in:
Juergen Hoeller
2014-05-19 22:29:10 +02:00
parent 51fc3b4aaf
commit 1285467fe6

View File

@@ -170,7 +170,7 @@ public class TestContextManager {
public void beforeTestClass() throws Exception {
Class<?> testClass = getTestContext().getTestClass();
if (logger.isTraceEnabled()) {
logger.trace("beforeTestClass(): class [" + testClass + "]");
logger.trace("beforeTestClass(): class [" + testClass.getName() + "]");
}
getTestContext().updateState(null, null, null);
@@ -284,8 +284,8 @@ public class TestContextManager {
public void afterTestMethod(Object testInstance, Method testMethod, Throwable exception) throws Exception {
Assert.notNull(testInstance, "testInstance must not be null");
if (logger.isTraceEnabled()) {
logger.trace("afterTestMethod(): instance [" + testInstance + "], method [" + testMethod + "], exception ["
+ exception + "]");
logger.trace("afterTestMethod(): instance [" + testInstance + "], method [" + testMethod +
"], exception [" + exception + "]");
}
getTestContext().updateState(testInstance, testMethod, exception);
@@ -327,7 +327,7 @@ public class TestContextManager {
public void afterTestClass() throws Exception {
Class<?> testClass = getTestContext().getTestClass();
if (logger.isTraceEnabled()) {
logger.trace("afterTestClass(): class [" + testClass + "]");
logger.trace("afterTestClass(): class [" + testClass.getName() + "]");
}
getTestContext().updateState(null, null, null);