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 f582295c03..d7b9c1a245 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 @@ -441,14 +441,9 @@ public class TypeDescriptor implements Serializable { if (!ObjectUtils.nullSafeEquals(getType(), other.getType())) { return false; } - if (getAnnotations().length != other.getAnnotations().length) { + if (!Arrays.equals(getAnnotations(), other.getAnnotations())) { return false; } - for (Annotation ann : getAnnotations()) { - if (!ann.equals(other.getAnnotation(ann.annotationType()))) { - return false; - } - } if (isCollection() || isArray()) { return ObjectUtils.nullSafeEquals(getElementTypeDescriptor(), other.getElementTypeDescriptor()); }