Polishing

This commit is contained in:
Juergen Hoeller 2020-06-12 00:39:58 +02:00
parent 9138a04a0a
commit b24a337146
2 changed files with 4 additions and 1 deletions

View File

@ -349,6 +349,9 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
else {
String scopeName = mbd.getScope();
if (!StringUtils.hasLength(scopeName)) {
throw new IllegalStateException("No scope name defined for bean ´" + beanName + "'");
}
Scope scope = this.scopes.get(scopeName);
if (scope == null) {
throw new IllegalStateException("No Scope registered for scope name '" + scopeName + "'");

View File

@ -555,12 +555,12 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
LogMessage.format("Ignoring bean class loading failure for bean '%s'", beanName) :
LogMessage.format("Ignoring unresolvable metadata in bean definition '%s'", beanName));
logger.trace(message, ex);
// Register exception, in case the bean was accidentally unresolvable.
onSuppressedException(ex);
}
}
}
// Check manually registered singletons too.
for (String beanName : this.manualSingletonNames) {
try {