From 1285467fe64807ce218ef7fc959b54923d7c5f9b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 19 May 2014 22:29:10 +0200 Subject: [PATCH] Consistently log Class.getName() instead of Class.toString(), avoiding double class term in log message Issue: SPR-11804 --- .../springframework/test/context/TestContextManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 4cf38da199..3551c9d030 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 @@ -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);