Skip to content

Commit 21a3eec

Browse files
committed
Merge branch '4.0.x'
Closes gh-50425
2 parents 458b8ba + 3213393 commit 21a3eec

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ public Set<String> getUnconditionalClasses() {
167167
* @return the {@link ConditionEvaluationReport} or {@code null}
168168
*/
169169
public static @Nullable ConditionEvaluationReport find(BeanFactory beanFactory) {
170-
if (beanFactory instanceof ConfigurableListableBeanFactory) {
171-
return ConditionEvaluationReport.get((ConfigurableListableBeanFactory) beanFactory);
170+
if (beanFactory instanceof ConfigurableListableBeanFactory configurableListableBeanFactory) {
171+
return ConditionEvaluationReport.get(configurableListableBeanFactory);
172172
}
173173
return null;
174174
}

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
@@ -672,8 +672,8 @@ protected final String getAnnotationName() {
672672
}
673673

674674
private Set<BeanType> deducedBeanType(ConditionContext context, AnnotatedTypeMetadata metadata) {
675-
if (metadata instanceof MethodMetadata && metadata.isAnnotated(Bean.class.getName())) {
676-
return deducedBeanTypeForBeanMethod(context, (MethodMetadata) metadata);
675+
if (metadata instanceof MethodMetadata methodMetadata && metadata.isAnnotated(Bean.class.getName())) {
676+
return deducedBeanTypeForBeanMethod(context, methodMetadata);
677677
}
678678
return Collections.emptySet();
679679
}

0 commit comments

Comments
 (0)