Polishing

This commit is contained in:
Juergen Hoeller
2018-10-09 23:14:49 +02:00
parent f662e3b85e
commit 053820c4ff
4 changed files with 8 additions and 8 deletions

View File

@@ -294,9 +294,9 @@ public abstract class BeanFactoryUtils {
if (hbf.getParentBeanFactory() instanceof ListableBeanFactory) {
Map<String, T> parentResult = beansOfTypeIncludingAncestors(
(ListableBeanFactory) hbf.getParentBeanFactory(), type);
parentResult.forEach((beanName, beanType) -> {
parentResult.forEach((beanName, beanInstance) -> {
if (!result.containsKey(beanName) && !hbf.containsLocalBean(beanName)) {
result.put(beanName, beanType);
result.put(beanName, beanInstance);
}
});
}
@@ -343,9 +343,9 @@ public abstract class BeanFactoryUtils {
if (hbf.getParentBeanFactory() instanceof ListableBeanFactory) {
Map<String, T> parentResult = beansOfTypeIncludingAncestors(
(ListableBeanFactory) hbf.getParentBeanFactory(), type, includeNonSingletons, allowEagerInit);
parentResult.forEach((beanName, beanType) -> {
parentResult.forEach((beanName, beanInstance) -> {
if (!result.containsKey(beanName) && !hbf.containsLocalBean(beanName)) {
result.put(beanName, beanType);
result.put(beanName, beanInstance);
}
});
}

View File

@@ -199,8 +199,8 @@ public class JobDetailFactoryBean
if (this.applicationContextJobDataKey != null) {
if (this.applicationContext == null) {
throw new IllegalStateException(
"JobDetailBean needs to be set up in an ApplicationContext " +
"to be able to handle an 'applicationContextJobDataKey'");
"JobDetailBean needs to be set up in an ApplicationContext " +
"to be able to handle an 'applicationContextJobDataKey'");
}
getJobDataMap().put(this.applicationContextJobDataKey, this.applicationContext);
}

View File

@@ -84,7 +84,7 @@ public class AnnotationMetadataReadingVisitor extends ClassMetadataReadingVisito
}
@Override
public AnnotationVisitor visitAnnotation(final String desc, boolean visible) {
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
String className = Type.getType(desc).getClassName();
this.annotationSet.add(className);
return new AnnotationAttributesReadingVisitor(

View File

@@ -111,7 +111,7 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini
}
private List<RouterFunction<?>> routerFunctions() {
List<RouterFunction<?>> functions = this.getApplicationContext()
List<RouterFunction<?>> functions = obtainApplicationContext()
.getBeanProvider(RouterFunction.class)
.orderedStream()
.map(router -> (RouterFunction<?>)router)