diff --git a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java index c0a6e1768ca..c4115d80371 100644 --- a/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java +++ b/spring-core/src/main/java/org/springframework/core/convert/TypeDescriptor.java @@ -692,6 +692,16 @@ public class TypeDescriptor implements Serializable { this.annotations = annotations; } + @Override + public boolean isAnnotationPresent(Class annotationClass) { + for (Annotation annotation : getAnnotations()) { + if (annotation.annotationType() == annotationClass) { + return true; + } + } + return false; + } + @Override @SuppressWarnings("unchecked") public T getAnnotation(Class annotationClass) {