aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/AspectInitError.java23
-rw-r--r--tests/bugs/ThisJoinPointAndVerifier.java28
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/bugs/AspectInitError.java b/tests/bugs/AspectInitError.java
new file mode 100644
index 000000000..3a46b9c5a
--- /dev/null
+++ b/tests/bugs/AspectInitError.java
@@ -0,0 +1,23 @@
+
+
+/** Bugzilla Bug 34206
+ before():execution(new(..)) does not throw NoAspectBoundException */
+public class AspectInitError {
+ public static void main(String[] args) {
+ //Watchcall.aspectOf();
+ AspectInitError c = new AspectInitError();
+ }
+
+}
+
+aspect Watchcall {
+ pointcut myConstructor(): execution(new(..));
+
+ before(): myConstructor() {
+ System.err.println("Entering Constructor");
+ }
+
+ after(): myConstructor() {
+ System.err.println("Leaving Constructor");
+ }
+}
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