mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-24 02:09:05 +00:00
Merge branch '4.0.x'
Closes gh-50425
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user