diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-26 08:11:38 +0200 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-06-26 13:48:27 +0700 |
commit | db76c175037c10ce21fc8f7fe681162e31082445 (patch) | |
tree | c722587c4fb6bc229c28e744dea918dc6f003e3d /org.aspectj.matcher | |
parent | 00998fd4b23ad0d3e0cd292127297e0fb249c36f (diff) | |
download | aspectj-db76c175037c10ce21fc8f7fe681162e31082445.tar.gz aspectj-db76c175037c10ce21fc8f7fe681162e31082445.zip |
Add method ArrayReferenceType.equals to fix failing tests
This also fixes a bug. Previously, ResolvedType.equals was used for
equality check, and in there is a '==' comparison, which does not work
for two different ArrayReferenceType instances, even if the component
type is the same.
Relates to #246.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'org.aspectj.matcher')
-rw-r--r-- | org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java index 23aaa2e5e..76d947e76 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java @@ -208,4 +208,12 @@ public class ArrayReferenceType extends ReferenceType { return false; } } + + @Override + public boolean equals(Object other) { + if (other instanceof ArrayReferenceType) + return componentType.equals(((ArrayReferenceType) other).componentType); + return super.equals(other); + } + } |