提交 8b023b17 编写于 作者: S Sam Brannen

Polish contribution

See gh-23435
上级 1dc2177a
/* /*
* Copyright 2002-2017 the original author or authors. * Copyright 2002-2019 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -76,8 +76,7 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { ...@@ -76,8 +76,7 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor {
@Override @Override
@Nullable @Nullable
public Object postProcessBeforeInitialization(final Object bean, String beanName) throws BeansException { public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (!(bean instanceof EnvironmentAware || bean instanceof EmbeddedValueResolverAware || if (!(bean instanceof EnvironmentAware || bean instanceof EmbeddedValueResolverAware ||
bean instanceof ResourceLoaderAware || bean instanceof ApplicationEventPublisherAware || bean instanceof ResourceLoaderAware || bean instanceof ApplicationEventPublisherAware ||
bean instanceof MessageSourceAware || bean instanceof ApplicationContextAware)){ bean instanceof MessageSourceAware || bean instanceof ApplicationContextAware)){
...@@ -86,7 +85,7 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { ...@@ -86,7 +85,7 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor {
AccessControlContext acc = null; AccessControlContext acc = null;
if (System.getSecurityManager() != null ) { if (System.getSecurityManager() != null) {
acc = this.applicationContext.getBeanFactory().getAccessControlContext(); acc = this.applicationContext.getBeanFactory().getAccessControlContext();
} }
...@@ -126,9 +125,4 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { ...@@ -126,9 +125,4 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor {
} }
} }
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) {
return bean;
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册