Polishing
This commit is contained in:
@@ -668,12 +668,14 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
||||
@Nullable
|
||||
public <A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType)
|
||||
throws NoSuchBeanDefinitionException {
|
||||
return findMergedAnnotationOnBean(beanName, annotationType).synthesize(
|
||||
MergedAnnotation::isPresent).orElse(null);
|
||||
|
||||
return findMergedAnnotationOnBean(beanName, annotationType)
|
||||
.synthesize(MergedAnnotation::isPresent).orElse(null);
|
||||
}
|
||||
|
||||
private <A extends Annotation> MergedAnnotation<A> findMergedAnnotationOnBean(
|
||||
String beanName, Class<A> annotationType) {
|
||||
|
||||
Class<?> beanType = getType(beanName);
|
||||
if (beanType != null) {
|
||||
MergedAnnotation<A> annotation = MergedAnnotations.from(beanType,
|
||||
|
||||
Reference in New Issue
Block a user