refactor: Extract bean definition skipping logic into a separate method

Signed-off-by: KNU-K <knukang334@gmail.com>
This commit is contained in:
KNU-K 2025-09-19 02:38:38 +09:00
parent 37bbf28830
commit f44e9899aa
1 changed files with 3 additions and 4 deletions

View File

@ -711,16 +711,15 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
}
private boolean shouldSkipBeanDefinition(
boolean isAbstract, boolean allowEagerInit,
private boolean shouldSkipBeanDefinition(boolean isAbstract, boolean allowEagerInit,
boolean hasBeanClass, boolean isLazyInit, @Nullable String factoryBeanName) {
if (isAbstract) {
return true;
}
if (!allowEagerInit) {
boolean needsEagerInit = (!hasBeanClass && isLazyInit && !isAllowEagerClassLoading())
|| requiresEagerInitForType(factoryBeanName);
boolean needsEagerInit = (!hasBeanClass && isLazyInit && !isAllowEagerClassLoading()) ||
requiresEagerInitForType(factoryBeanName);
if (needsEagerInit) {
return true;
}