Skip to content

Commit 17863df

Browse files
committed
AnnotatedElementAdapter explicitly declares isAnnotationPresent method
Issue: SPR-14872
1 parent 56bb20d commit 17863df

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
@@ -692,6 +692,16 @@ public AnnotatedElementAdapter(Annotation[] annotations) {
692692
this.annotations = annotations;
693693
}
694694

695+
@Override
696+
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) {
697+
for (Annotation annotation : getAnnotations()) {
698+
if (annotation.annotationType() == annotationClass) {
699+
return true;
700+
}
701+
}
702+
return false;
703+
}
704+
695705
@Override
696706
@SuppressWarnings("unchecked")
697707
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {

0 commit comments

Comments
 (0)