aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-09-05 03:58:13 +0000
committerjhugunin <jhugunin>2003-09-05 03:58:13 +0000
commit58436592bb9fe64341d9013779fe377bb55a24e2 (patch)
treeaf4f40b4ae6b0943fa45cb3e755b3ed25f618306 /tests
parent8660cc12bfbcd6f4957abd4dfc84735de6c048cf (diff)
downloadaspectj-58436592bb9fe64341d9013779fe377bb55a24e2.tar.gz
aspectj-58436592bb9fe64341d9013779fe377bb55a24e2.zip
test and fix for bug reported today on aspectj-dev
This bug is a reversion from 1.1.0 and so was a high-priority to get fixed before the 1.1.1rc2 release tommorrow. The bug was caused by a conflict between the implementation of perthis and a fix made in 1.1.1rc1 to the code for signature matching to handle inter-type declarations correctly. The fix was the addition of two null pointer checks. I hope that the original reporter will file a bug report in bugzilla tomorrow for tracking.
Diffstat (limited to 'tests')
-rw-r--r--tests/ajcTests.xml7
-rw-r--r--tests/bugs/InterPerCall.java21
2 files changed, 28 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml
index 6f9e4dddf..24569cf2a 100644
--- a/tests/ajcTests.xml
+++ b/tests/ajcTests.xml
@@ -6730,4 +6730,11 @@
<message line="7" kind="warning" text="throws both"/>
</compile>
</ajc-test>
+
+ <!-- This test needs a corresponding bug report -->
+ <ajc-test dir="bugs"
+ title="perthis and signature bad interaction">
+ <compile files="InterPerCall.java"/>
+ <run class="InterPerCall"/>
+ </ajc-test>
</suite>
diff --git a/tests/bugs/InterPerCall.java b/tests/bugs/InterPerCall.java
new file mode 100644
index 000000000..5ee4f821e
--- /dev/null
+++ b/tests/bugs/InterPerCall.java
@@ -0,0 +1,21 @@
+public class InterPerCall {
+ public static void main(String[] args) {
+ new D().m();
+ }
+}
+
+class C {
+}
+
+class D extends C {
+ public void m() { }
+}
+
+aspect A perthis(p1()) {
+ pointcut p1(): execution(void D.m());
+ pointcut p2(): execution(void C.m());
+
+ before(): p2() {
+ System.out.println("hello");
+ }
+} \ No newline at end of file