TypeDescriptor avoids merged annotations for equality comparisons
Issue: SPR-14926 Issue: SPR-14929
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user