Browse Source

[SPR-8387] polishing

pull/7/head
Sam Brannen 14 years ago
parent
commit
8e497d9627
  1. 2
      org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java
  2. 4
      org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java
  3. 8
      org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java

2
org.springframework.test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java

@ -50,8 +50,6 @@ abstract class ContextLoaderUtils { @@ -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";

4
org.springframework.test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java

@ -96,8 +96,8 @@ public class MergedContextConfiguration { @@ -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);
}
/**

8
org.springframework.test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java

@ -70,7 +70,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader { @@ -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 { @@ -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 { @@ -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));
}

Loading…
Cancel
Save