mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Simplify logic in ApplicationContextAwareProcessor.postProcessBeforeInitialization()
This commit is contained in:
+2
-7
@@ -81,14 +81,9 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor {
|
||||
@Override
|
||||
@Nullable
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
if (!((bean instanceof Aware) && (bean instanceof EnvironmentAware || bean instanceof EmbeddedValueResolverAware ||
|
||||
bean instanceof ResourceLoaderAware || bean instanceof ApplicationEventPublisherAware ||
|
||||
bean instanceof MessageSourceAware || bean instanceof ApplicationStartupAware ||
|
||||
bean instanceof ApplicationContextAware))) {
|
||||
return bean;
|
||||
if (bean instanceof Aware) {
|
||||
invokeAwareInterfaces(bean);
|
||||
}
|
||||
|
||||
invokeAwareInterfaces(bean);
|
||||
return bean;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user