提交 21f3f59c 编写于 作者: S Sam Brannen

[SPR-8387] Log messages now refer to default detection instead of default generation.

上级 0df46317
......@@ -152,7 +152,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
if (!new ClassPathResource(resourcePath, clazz).exists()) {
if (logger.isInfoEnabled()) {
logger.info(String.format("Cannot generate default resource locations for test class [%s]: "
logger.info(String.format("Could not detect default resource locations for test class [%s]: "
+ "classpath resource [%s] does not exist.", clazz.getName(), resourcePath));
}
return EMPTY_STRING_ARRAY;
......
......@@ -154,7 +154,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
if (configClasses.isEmpty()) {
if (logger.isInfoEnabled()) {
logger.info(String.format("Cannot generate default configuration classes for test class [%s]: "
logger.info(String.format("Could not detect default configuration classes for test class [%s]: "
+ "%s does not declare any static, non-private, non-final, inner classes "
+ "annotated with @Configuration.", declaringClass.getName(), declaringClass.getSimpleName()));
}
......
......@@ -87,7 +87,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader {
if (!defaultResourcesAlreadyGenerated && loader.generatesDefaults()) {
if (logger.isDebugEnabled()) {
logger.debug(String.format(
"Delegating to %s to generate defaults for context configuration [%s].",
"Delegating to %s to detect defaults for context configuration [%s].",
loader.getClass().getName(), configAttributes));
}
......@@ -96,7 +96,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader {
if (configAttributes.hasResources()) {
if (logger.isInfoEnabled()) {
logger.info(String.format("SmartContextLoader candidate %s "
+ "generated defaults for context configuration [%s].", loader, configAttributes));
+ "detected defaults for context configuration [%s].", loader, configAttributes));
}
}
}
......@@ -105,10 +105,8 @@ public class DelegatingSmartContextLoader implements SmartContextLoader {
// If any loader claims to generate defaults but none actually did,
// throw an exception.
if (!configAttributes.hasResources()) {
throw new IllegalStateException(
String.format("None of the SmartContextLoader candidates %s "
+ "was able to generate defaults for context configuration [%s].", candidates,
configAttributes));
throw new IllegalStateException(String.format("None of the SmartContextLoader candidates %s "
+ "was able to detect defaults for context configuration [%s].", candidates, configAttributes));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册