|
|
|
|
@ -483,7 +483,7 @@ public class TypeDescriptor implements Serializable {
@@ -483,7 +483,7 @@ public class TypeDescriptor implements Serializable {
|
|
|
|
|
} |
|
|
|
|
if (anns.length > 0) { |
|
|
|
|
for (int i = 0; i < anns.length; i++) { |
|
|
|
|
if (anns[i] != otherAnns[i]) { |
|
|
|
|
if (!annotationEquals(anns[i], otherAnns[i])) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -491,6 +491,11 @@ public class TypeDescriptor implements Serializable {
@@ -491,6 +491,11 @@ public class TypeDescriptor implements Serializable {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean annotationEquals(Annotation ann, Annotation otherAnn) { |
|
|
|
|
// Annotation.equals is reflective and pretty slow, so let's check identity and proxy type first.
|
|
|
|
|
return (ann == otherAnn || (ann.getClass() == otherAnn.getClass() && ann.equals(otherAnn))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public int hashCode() { |
|
|
|
|
return getType().hashCode(); |
|
|
|
|
|