[SPR-8387] Log messages now refer to default detection instead of default generation.
This commit is contained in:
parent
0df4631788
commit
21f3f59cb7
|
|
@ -152,7 +152,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader {
|
||||||
|
|
||||||
if (!new ClassPathResource(resourcePath, clazz).exists()) {
|
if (!new ClassPathResource(resourcePath, clazz).exists()) {
|
||||||
if (logger.isInfoEnabled()) {
|
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));
|
+ "classpath resource [%s] does not exist.", clazz.getName(), resourcePath));
|
||||||
}
|
}
|
||||||
return EMPTY_STRING_ARRAY;
|
return EMPTY_STRING_ARRAY;
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
|
||||||
|
|
||||||
if (configClasses.isEmpty()) {
|
if (configClasses.isEmpty()) {
|
||||||
if (logger.isInfoEnabled()) {
|
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 "
|
+ "%s does not declare any static, non-private, non-final, inner classes "
|
||||||
+ "annotated with @Configuration.", declaringClass.getName(), declaringClass.getSimpleName()));
|
+ "annotated with @Configuration.", declaringClass.getName(), declaringClass.getSimpleName()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader {
|
||||||
if (!defaultResourcesAlreadyGenerated && loader.generatesDefaults()) {
|
if (!defaultResourcesAlreadyGenerated && loader.generatesDefaults()) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(String.format(
|
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));
|
loader.getClass().getName(), configAttributes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ public class DelegatingSmartContextLoader implements SmartContextLoader {
|
||||||
if (configAttributes.hasResources()) {
|
if (configAttributes.hasResources()) {
|
||||||
if (logger.isInfoEnabled()) {
|
if (logger.isInfoEnabled()) {
|
||||||
logger.info(String.format("SmartContextLoader candidate %s "
|
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,
|
// If any loader claims to generate defaults but none actually did,
|
||||||
// throw an exception.
|
// throw an exception.
|
||||||
if (!configAttributes.hasResources()) {
|
if (!configAttributes.hasResources()) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(String.format("None of the SmartContextLoader candidates %s "
|
||||||
String.format("None of the SmartContextLoader candidates %s "
|
+ "was able to detect defaults for context configuration [%s].", candidates, configAttributes));
|
||||||
+ "was able to generate defaults for context configuration [%s].", candidates,
|
|
||||||
configAttributes));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue