summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/Four.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features152/synchronization/transformed/Four.java')
-rw-r--r--tests/features152/synchronization/transformed/Four.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/features152/synchronization/transformed/Four.java b/tests/features152/synchronization/transformed/Four.java
new file mode 100644
index 000000000..454fdb1f1
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Four.java
@@ -0,0 +1,29 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect Four {
+ public static void main(String[] args) {
+ new C().m();
+ try {new C().m2(); } catch (MyException me) {int i=1;}
+ }
+ after() returning: execution(synchronized * m(..)) { System.err.println("execution advice running1");}
+ after() throwing: execution(synchronized * m2(..)) { System.err.println("execution advice running2");}
+}
+
+class C {
+
+ public synchronized void m() {
+ System.err.println("hello");
+ }
+
+ public synchronized void m2() {
+ System.err.println("hello");
+ throw new MyException();
+ }
+
+}
+
+class MyException extends RuntimeException { }
+
+aspect FourX { pointcut p(): lock(); }