Merge branch '3.0.x'
Closes gh-34939
This commit is contained in:
@@ -24,7 +24,6 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
@@ -182,13 +181,8 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
|
||||
for (String type : spec.getTypes()) {
|
||||
Collection<String> typeMatches = getBeanNamesForType(classLoader, considerHierarchy, beanFactory, type,
|
||||
parameterizedContainers);
|
||||
Iterator<String> iterator = typeMatches.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
String match = iterator.next();
|
||||
if (beansIgnoredByType.contains(match) || ScopedProxyUtils.isScopedTarget(match)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
typeMatches
|
||||
.removeIf((match) -> beansIgnoredByType.contains(match) || ScopedProxyUtils.isScopedTarget(match));
|
||||
if (typeMatches.isEmpty()) {
|
||||
result.recordUnmatchedType(type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user