Skip to content

Commit 1d6483c

Browse files
committed
Merge branch '3.4.x' into 3.5.x
2 parents ae4a69a + 682ad66 commit 1d6483c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,10 @@ private Set<String> matchedNamesFrom(Map<String, BeanDefinition> namedDefinition
271271

272272
private boolean isCandidate(ConfigurableListableBeanFactory beanFactory, String name, BeanDefinition definition,
273273
Set<String> ignoredBeans) {
274-
if (ignoredBeans.contains(name) || definition == null) {
274+
if (ignoredBeans.contains(name)) {
275275
return false;
276276
}
277-
if (definition.isAutowireCandidate() && isDefaultCandidate(definition)) {
277+
if (definition == null || (definition.isAutowireCandidate() && isDefaultCandidate(definition))) {
278278
return true;
279279
}
280280
if (ScopedProxyUtils.isScopedTarget(name)) {

0 commit comments

Comments
 (0)