Polish contribution

This commit is contained in:
Sam Brannen 2022-11-18 15:07:08 +01:00
parent e9555d4825
commit cefd74555a
1 changed files with 2 additions and 3 deletions

View File

@ -1366,8 +1366,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
// Give any InstantiationAwareBeanPostProcessors the opportunity to modify the
// state of the bean before properties are set. This can be used, for example,
// to support styles of field injection.
boolean hasInstAwareBpps = hasInstantiationAwareBeanPostProcessors();
if (!mbd.isSynthetic() && hasInstAwareBpps) {
if (!mbd.isSynthetic() && hasInstantiationAwareBeanPostProcessors()) {
for (InstantiationAwareBeanPostProcessor bp : getBeanPostProcessorCache().instantiationAware) {
if (!bp.postProcessAfterInstantiation(bw.getWrappedInstance(), beanName)) {
return;
@ -1390,7 +1389,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
}
pvs = newPvs;
}
if (hasInstAwareBpps) {
if (hasInstantiationAwareBeanPostProcessors()) {
if (pvs == null) {
pvs = mbd.getPropertyValues();
}