aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/ThisJoinPointAndVerifier.java
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-03-11 21:04:59 +0000
committerjhugunin <jhugunin>2003-03-11 21:04:59 +0000
commitd6b8b38cd0a707741788f8d4fae3850b213f50a4 (patch)
tree89d0af7f7012388a9b58aac2f1e0b5ce0b3e716d /tests/bugs/ThisJoinPointAndVerifier.java
parentbb66774ab4a5afb36d36bc8274ff265f10d666db (diff)
downloadaspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.tar.gz
aspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.zip
added tests and fixes
fixed two bugs in ajcTestsFailing
Diffstat (limited to 'tests/bugs/ThisJoinPointAndVerifier.java')
-rw-r--r--tests/bugs/ThisJoinPointAndVerifier.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/bugs/ThisJoinPointAndVerifier.java b/tests/bugs/ThisJoinPointAndVerifier.java
new file mode 100644
index 000000000..a3b609c40
--- /dev/null
+++ b/tests/bugs/ThisJoinPointAndVerifier.java
@@ -0,0 +1,28 @@
+
+
+/** Bugzilla Bug 34210
+ thisJoinPoint.getArgs() causes IncompatibleClassChangeError */
+public class ThisJoinPointAndVerifier {
+ public void method() {
+ System.out.println("Executed method");
+ }
+ public static void main(String args[]) {
+ ThisJoinPointAndVerifier td = new ThisJoinPointAndVerifier();
+ td.method();
+ }
+}
+
+aspect Log1 {
+ pointcut logged_method() :
+ call(* ThisJoinPointAndVerifier.*(..));
+ after() : logged_method() {
+ Object[] args = thisJoinPoint.getArgs();
+ System.out.println ("Log1a: leaving " + thisJoinPoint.getSignature());
+ }
+ // comment this advice for scenario 2
+ after() : logged_method() {
+ //VM crash on scenario 1
+ //Object[] args = thisJoinPoint.getArgs();
+ System.out.println ("Log1b: leaving " + thisJoinPoint.getSignature());
+ }
+} \ No newline at end of file