aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.aspectj.matcher/src/main/java/org/aspectj/weaver/ArrayReferenceType.java8
-rw-r--r--tests/bugs1920/github_246/ITDAspect.aj10
-rw-r--r--tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml4
3 files changed, 21 insertions, 1 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);
+ }
+
}
diff --git a/tests/bugs1920/github_246/ITDAspect.aj b/tests/bugs1920/github_246/ITDAspect.aj
index fffef1651..7e4f30e3f 100644
--- a/tests/bugs1920/github_246/ITDAspect.aj
+++ b/tests/bugs1920/github_246/ITDAspect.aj
@@ -10,4 +10,14 @@ public aspect ITDAspect {
public int App.foo(int parameter) {
return parameter + 3;
}
+
+ public void App.foo(String... parameters) { }
+
+ @Second
+ public int App.foo(int... parameters) {
+ int sum = 0;
+ for (int parameter : parameters)
+ sum += parameter;
+ return sum;
+ }
}
diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml
index 2026df491..9f072c86d 100644
--- a/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml
+++ b/tests/src/test/resources/org/aspectj/systemtest/ajc1920/ajc1920.xml
@@ -181,8 +181,10 @@
<compile files="First.java Second.java App.java ITDAspect.aj" options="-8"/>
<run class="App">
<stdout>
- <line text="[@First(), @Second()] public void App.foo(java.lang.Object)"/>
+ <line text="[@Second()] public int App.foo(int[])"/>
<line text="[@First()] public void App.foo(java.lang.String)"/>
+ <line text="[] public void App.foo(java.lang.String[])"/>
+ <line text="[@First(), @Second()] public void App.foo(java.lang.Object)"/>
<line text="[@Second()] public int App.foo(int)"/>
</stdout>
</run>