From 8e497d96277d38994e257cef7671844ef95acc3c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 26 Jun 2011 17:13:09 +0000 Subject: [PATCH] [SPR-8387] polishing --- .../springframework/test/context/ContextLoaderUtils.java | 2 -- .../test/context/MergedContextConfiguration.java | 4 ++-- .../context/support/DelegatingSmartContextLoader.java | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java index 372b617be0..bb32e13e31 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java @@ -50,8 +50,6 @@ abstract class ContextLoaderUtils { private static final Log logger = LogFactory.getLog(ContextLoaderUtils.class); - // private static final String DEFAULT_CONTEXT_LOADER_CLASS_NAME = - // "org.springframework.test.context.support.GenericXmlContextLoader"; private static final String DEFAULT_CONTEXT_LOADER_CLASS_NAME = "org.springframework.test.context.support.DelegatingSmartContextLoader"; diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java b/org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java index c9e92ab89f..9ce5b9612a 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java @@ -96,8 +96,8 @@ public class MergedContextConfiguration { String activeProfilesKey = ObjectUtils.nullSafeToString(activeProfiles); String contextLoaderKey = contextLoader == null ? "null" : contextLoader.getClass().getName(); - return String.format("locations = [%s], classes = [%s], activeProfiles = [%s], contextLoader = [%s]", - locationsKey, classesKey, activeProfilesKey, contextLoaderKey); + return String.format("locations = %s, classes = %s, activeProfiles = %s, contextLoader = %s", locationsKey, + classesKey, activeProfilesKey, contextLoaderKey); } /** diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java b/org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java index 6aa828a1c9..648c11f2a4 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java @@ -70,7 +70,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader { for (SmartContextLoader loader : candidates) { if (logger.isDebugEnabled()) { - logger.debug(String.format("Delegating to loader [%s] to process context configuration [%s].", + logger.debug(String.format("Delegating to %s to process context configuration [%s].", loader.getClass().getName(), configAttributes)); } @@ -120,8 +120,8 @@ public class DelegatingSmartContextLoader implements SmartContextLoader { for (SmartContextLoader loader : candidates) { if (logger.isDebugEnabled()) { - logger.debug(String.format("Delegating to loader [%s] to load context from [%s].", - loader.getClass().getName(), mergedConfig)); + logger.debug(String.format("Delegating to %s to load context from [%s].", loader.getClass().getName(), + mergedConfig)); } // Ask each loader if it can load a context from the mergedConfig. @@ -132,7 +132,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader { } } - throw new IllegalStateException(String.format("None of the candidate SmartContextLoaders [%s] " + throw new IllegalStateException(String.format("None of the candidate SmartContextLoaders %s " + "was able to load an ApplicationContext from [%s].", candidates, mergedConfig)); }