Merge branch '4.0.x'

Closes gh-50425
This commit is contained in:
Phillip Webb
2026-05-13 07:47:34 -07:00
2 changed files with 4 additions and 4 deletions
@@ -167,8 +167,8 @@ public final class ConditionEvaluationReport {
* @return the {@link ConditionEvaluationReport} or {@code null}
*/
public static @Nullable ConditionEvaluationReport find(BeanFactory beanFactory) {
if (beanFactory instanceof ConfigurableListableBeanFactory) {
return ConditionEvaluationReport.get((ConfigurableListableBeanFactory) beanFactory);
if (beanFactory instanceof ConfigurableListableBeanFactory configurableListableBeanFactory) {
return ConditionEvaluationReport.get(configurableListableBeanFactory);
}
return null;
}
@@ -672,8 +672,8 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
}
private Set<BeanType> deducedBeanType(ConditionContext context, AnnotatedTypeMetadata metadata) {
if (metadata instanceof MethodMetadata && metadata.isAnnotated(Bean.class.getName())) {
return deducedBeanTypeForBeanMethod(context, (MethodMetadata) metadata);
if (metadata instanceof MethodMetadata methodMetadata && metadata.isAnnotated(Bean.class.getName())) {
return deducedBeanTypeForBeanMethod(context, methodMetadata);
}
return Collections.emptySet();
}