Skip to content

Commit be853d4

Browse files
committed
AnnotatedElementAdapter explicitly declares isAnnotationPresent method
Issue: SPR-14872 (cherry picked from commit 17863df)
1 parent dc9a8ee commit be853d4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,16 @@ public AnnotatedElementAdapter(Annotation[] annotations) {
688688
this.annotations = annotations;
689689
}
690690

691+
@Override
692+
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
693+
for (Annotation annotation : getAnnotations()) {
694+
if (annotation.annotationType() == annotationClass) {
695+
return true;
696+
}
697+
}
698+
return false;
699+
}
700+
691701
@Override
692702
@SuppressWarnings("unchecked")
693703
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {

0 commit comments

Comments
 (0)