Skip to content

Commit 0635d86

Browse files
committed
Merge pull request #16745 from izeye
* pr/16745: Use MergedAnnotation.getRoot() in PropertyMappingCheckBeanPostProcessor
2 parents 9b73d65 + 652906e commit 0635d86

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/properties/PropertyMappingContextCustomizer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ public Object postProcessBeforeInitialization(Object bean, String beanName)
9393
}
9494

9595
private Class<?> getRoot(MergedAnnotation<?> annotation) {
96-
while (annotation.getParent() != null) {
97-
annotation = annotation.getParent();
98-
}
99-
return annotation.getType();
96+
return annotation.getRoot().getType();
10097
}
10198

10299
private String getAnnotationsDescription(Set<Class<?>> annotations) {

0 commit comments

Comments
 (0)