From 17863dfbda56f1a9d820d5dd550ca9e6d8d7b01a Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 2 Nov 2016 14:41:11 +0100 Subject: [PATCH] AnnotatedElementAdapter explicitly declares isAnnotationPresent method Issue: SPR-14872 --- .../springframework/core/convert/TypeDescriptor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) {