Skip to content

Commit 5ce1438

Browse files
committed
Merge branch '3.5.x'
2 parents 32ca67a + 1d6483c commit 5ce1438

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

core/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
@@ -279,10 +279,10 @@ private Set<String> matchedNamesFrom(Map<String, @Nullable BeanDefinition> named
279279

280280
private boolean isCandidate(ConfigurableListableBeanFactory beanFactory, String name,
281281
@Nullable BeanDefinition definition, Set<String> ignoredBeans) {
282-
if (ignoredBeans.contains(name) || definition == null) {
282+
if (ignoredBeans.contains(name)) {
283283
return false;
284284
}
285-
if (definition.isAutowireCandidate() && isDefaultCandidate(definition)) {
285+
if (definition == null || (definition.isAutowireCandidate() && isDefaultCandidate(definition))) {
286286
return true;
287287
}
288288
if (ScopedProxyUtils.isScopedTarget(name)) {

0 commit comments

Comments
 (0)