summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features152/synchronization/transformed')
-rw-r--r--tests/features152/synchronization/transformed/Eight.java22
-rw-r--r--tests/features152/synchronization/transformed/Eleven.java22
-rw-r--r--tests/features152/synchronization/transformed/Five.java38
-rw-r--r--tests/features152/synchronization/transformed/Four.java29
-rw-r--r--tests/features152/synchronization/transformed/Investigation.java357
-rw-r--r--tests/features152/synchronization/transformed/Nine.java22
-rw-r--r--tests/features152/synchronization/transformed/One.java39
-rw-r--r--tests/features152/synchronization/transformed/OtherTargeters.java25
-rw-r--r--tests/features152/synchronization/transformed/Seven.java22
-rw-r--r--tests/features152/synchronization/transformed/Six.java26
-rw-r--r--tests/features152/synchronization/transformed/Ten.java22
-rw-r--r--tests/features152/synchronization/transformed/Thirteen.java6
-rw-r--r--tests/features152/synchronization/transformed/Three.java44
-rw-r--r--tests/features152/synchronization/transformed/Twelve.java22
-rw-r--r--tests/features152/synchronization/transformed/Two.java19
-rw-r--r--tests/features152/synchronization/transformed/expected/C.b.txt22
-rw-r--r--tests/features152/synchronization/transformed/expected/C.bbb.txt38
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m.txt23
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m2.txt28
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m3.txt23
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m32.txt28
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m33.txt24
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m34.txt26
-rw-r--r--tests/features152/synchronization/transformed/expected/C.m4.txt26
-rw-r--r--tests/features152/synchronization/transformed/expected/C.ma.txt22
-rw-r--r--tests/features152/synchronization/transformed/expected/Investigation.b.txt21
-rw-r--r--tests/features152/synchronization/transformed/expected/Investigation.c.txt35
-rw-r--r--tests/features152/synchronization/transformed/expected/Investigation.d.txt38
-rw-r--r--tests/features152/synchronization/transformed/expected/Investigation.e.txt40
-rw-r--r--tests/features152/synchronization/transformed/expected/One.b.txt22
-rw-r--r--tests/features152/synchronization/transformed/expected/One.c.txt36
-rw-r--r--tests/features152/synchronization/transformed/expected/One.e.txt43
32 files changed, 1210 insertions, 0 deletions
diff --git a/tests/features152/synchronization/transformed/Eight.java b/tests/features152/synchronization/transformed/Eight.java
new file mode 100644
index 000000000..79af0a625
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Eight.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching unlock in a transformed non-static method...
+
+public aspect Eight {
+ public static void main(String[] args) {
+ new C().b();
+ }
+
+ before(): !within(Eight) && unlock() {
+ System.err.println("Unlocking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Eleven.java b/tests/features152/synchronization/transformed/Eleven.java
new file mode 100644
index 000000000..e9a3fa85a
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Eleven.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching lock on transformed static method ( pre J5)
+
+public aspect Eleven {
+ public static void main(String[] args) {
+ C.b();
+ }
+
+ before(): !within(Eleven) && lock() {
+ System.err.println("Locking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Five.java b/tests/features152/synchronization/transformed/Five.java
new file mode 100644
index 000000000..e5e30c6f5
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Five.java
@@ -0,0 +1,38 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect Five {
+ public static void main(String[] args) {
+ C.b();
+ C.c();
+ C.d();
+ C.e();
+ }
+
+ before(): !within(Five) && call(* println(..)) { System.err.println("test");}
+}
+
+class C {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+
+ public static void c() {
+ synchronized (C.class) {
+ System.err.println("hello");
+ }
+ }
+ public static void d() {
+ synchronized (String.class) {
+ System.err.println("hello");
+ }
+ }
+ public static void e() {
+ synchronized (Five.class) {
+ System.err.println("hello");
+ }
+ }
+}
+
+aspect FiveX { pointcut p(): unlock(); }
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(); }
diff --git a/tests/features152/synchronization/transformed/Investigation.java b/tests/features152/synchronization/transformed/Investigation.java
new file mode 100644
index 000000000..1fad31a6f
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Investigation.java
@@ -0,0 +1,357 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public class Investigation {
+ public static void main(String[] args) {
+
+ }
+
+
+ // Basic synchronized method
+ public void a() {
+ synchronized (this) {
+
+ }
+ }
+
+ // ... that does something ...
+ public void b() {
+ synchronized (this) {
+ System.out.println("hello");
+ }
+ }
+
+ // ... that includes try/catch ...
+ public void c() {
+ synchronized(this) {
+ try {
+ File f = new File("fred");
+ FileInputStream fis = new FileInputStream(f);
+ } catch (IOException ioe) {
+ System.out.println("bang");
+ }
+ }
+ }
+
+ // ... with multiple synchronized blocks ...
+ public void d() {
+ synchronized (this) {
+ System.out.println("hello");
+ }
+ synchronized (this) {
+ System.out.println("world");
+ }
+ }
+
+ // ... with nested synchronized blocks ...
+ public void e() {
+ synchronized (this) {
+ System.out.println("hello");
+ synchronized (new String()) {
+ System.out.println("other");
+ }
+ }
+ }
+
+ /*
+ Compiled from "Investigation.java"
+ public class Investigation extends java.lang.Object
+ SourceFile: "Investigation.java"
+ minor version: 0
+ major version: 46
+ Constant pool:
+ const #1 = Asciz Investigation;
+ const #2 = class #1; // Investigation
+ const #3 = Asciz java/lang/Object;
+ const #4 = class #3; // java/lang/Object
+ const #5 = Asciz <init>;
+ const #6 = Asciz ()V;
+ const #7 = Asciz Code;
+ const #8 = NameAndType #5:#6;// "<init>":()V
+ const #9 = Method #4.#8; // java/lang/Object."<init>":()V
+ const #10 = Asciz LineNumberTable;
+ const #11 = Asciz LocalVariableTable;
+ const #12 = Asciz this;
+ const #13 = Asciz LInvestigation;;
+ const #14 = Asciz main;
+ const #15 = Asciz ([Ljava/lang/String;)V;
+ const #16 = Asciz org.aspectj.weaver.MethodDeclarationLineNumber;
+ const #17 = Asciz args;
+ const #18 = Asciz [Ljava/lang/String;;
+ const #19 = Asciz a;
+ const #20 = Asciz b;
+ const #21 = Asciz java/lang/System;
+ const #22 = class #21; // java/lang/System
+ const #23 = Asciz out;
+ const #24 = Asciz Ljava/io/PrintStream;;
+ const #25 = NameAndType #23:#24;// out:Ljava/io/PrintStream;
+ const #26 = Field #22.#25; // java/lang/System.out:Ljava/io/PrintStream;
+ const #27 = Asciz hello;
+ const #28 = String #27; // hello
+ const #29 = Asciz java/io/PrintStream;
+ const #30 = class #29; // java/io/PrintStream
+ const #31 = Asciz println;
+ const #32 = Asciz (Ljava/lang/String;)V;
+ const #33 = NameAndType #31:#32;// println:(Ljava/lang/String;)V
+ const #34 = Method #30.#33; // java/io/PrintStream.println:(Ljava/lang/String;)V
+ const #35 = Asciz c;
+ const #36 = Asciz java/io/File;
+ const #37 = class #36; // java/io/File
+ const #38 = Asciz fred;
+ const #39 = String #38; // fred
+ const #40 = NameAndType #5:#32;// "<init>":(Ljava/lang/String;)V
+ const #41 = Method #37.#40; // java/io/File."<init>":(Ljava/lang/String;)V
+ const #42 = Asciz java/io/FileInputStream;
+ const #43 = class #42; // java/io/FileInputStream
+ const #44 = Asciz (Ljava/io/File;)V;
+ const #45 = NameAndType #5:#44;// "<init>":(Ljava/io/File;)V
+ const #46 = Method #43.#45; // java/io/FileInputStream."<init>":(Ljava/io/File;)V
+ const #47 = Asciz bang;
+ const #48 = String #47; // bang
+ const #49 = Asciz java/io/IOException;
+ const #50 = class #49; // java/io/IOException
+ const #51 = Asciz f;
+ const #52 = Asciz Ljava/io/File;;
+ const #53 = Asciz d;
+ const #54 = Asciz world;
+ const #55 = String #54; // world
+ const #56 = Asciz e;
+ const #57 = Asciz java/lang/String;
+ const #58 = class #57; // java/lang/String
+ const #59 = Method #58.#8; // java/lang/String."<init>":()V
+ const #60 = Asciz other;
+ const #61 = String #60; // other
+ const #62 = Asciz SourceFile;
+ const #63 = Asciz Investigation.java;
+
+ {
+ public Investigation();
+ Code:
+ Stack=1, Locals=1, Args_size=1
+ 0: aload_0
+ 1: invokespecial #9; //Method java/lang/Object."<init>":()V
+ 4: return
+ LineNumberTable:
+ line 5: 0
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this LInvestigation;
+
+ public static void main(java.lang.String[]);
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 06 00 00 00 FFFFFF88
+ Code:
+ Stack=0, Locals=1, Args_size=1
+ 0: return
+ LineNumberTable:
+ line 8: 0
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 1 0 args [Ljava/lang/String;
+
+ public void a();
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 0C 00 00 00 FFFFFFD9
+ Code:
+ Stack=2, Locals=1, Args_size=1
+ 0: aload_0
+ 1: dup
+ 2: monitorenter
+ 3: monitorexit
+ 4: return
+ LineNumberTable:
+ line 13: 0
+ line 16: 4
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 5 0 this LInvestigation;
+
+ public void b();
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 13 00 00 01 38
+ Code:
+ Stack=2, Locals=2, Args_size=1
+ 0: aload_0
+ 1: dup
+ 2: astore_1
+ 3: monitorenter
+ 4: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 7: ldc #28; //String hello
+ 9: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 12: aload_1
+ 13: monitorexit
+ 14: goto 20
+ 17: aload_1
+ 18: monitorexit
+ 19: athrow
+ 20: return
+ Exception table:
+ from to target type
+ 4 14 17 any
+ 17 19 17 any
+ LineNumberTable:
+ line 20: 0
+ line 21: 4
+ line 20: 12
+ line 23: 20
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 21 0 this LInvestigation;
+
+ public void c();
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 1A 00 00 01 FFFFFFB7
+ Code:
+ Stack=3, Locals=3, Args_size=1
+ 0: aload_0
+ 1: dup
+ 2: astore_1
+ 3: monitorenter
+ 4: new #37; //class java/io/File
+ 7: dup
+ 8: ldc #39; //String fred
+ 10: invokespecial #41; //Method java/io/File."<init>":(Ljava/lang/String;)V
+ 13: astore_2
+ 14: new #43; //class java/io/FileInputStream
+ 17: dup
+ 18: aload_2
+ 19: invokespecial #46; //Method java/io/FileInputStream."<init>":(Ljava/io/File;)V
+ 22: pop
+ 23: goto 35
+ 26: pop
+ 27: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 30: ldc #48; //String bang
+ 32: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 35: aload_1
+ 36: monitorexit
+ 37: goto 43
+ 40: aload_1
+ 41: monitorexit
+ 42: athrow
+ 43: return
+ Exception table:
+ from to target type
+ 4 26 26 Class java/io/IOException
+
+ 4 37 40 any
+ 40 42 40 any
+ LineNumberTable:
+ line 27: 0
+ line 29: 4
+ line 30: 14
+ line 31: 26
+ line 32: 27
+ line 27: 35
+ line 35: 43
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 44 0 this LInvestigation;
+ 14 12 2 f Ljava/io/File;
+
+ public void d();
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 26 00 00 02 FFFFFFC2
+ Code:
+ Stack=2, Locals=2, Args_size=1
+ 0: aload_0
+ 1: dup
+ 2: astore_1
+ 3: monitorenter
+ 4: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 7: ldc #28; //String hello
+ 9: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 12: aload_1
+ 13: monitorexit
+ 14: goto 20
+ 17: aload_1
+ 18: monitorexit
+ 19: athrow
+ 20: aload_0
+ 21: dup
+ 22: astore_1
+ 23: monitorenter
+ 24: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 27: ldc #55; //String world
+ 29: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 32: aload_1
+ 33: monitorexit
+ 34: goto 40
+ 37: aload_1
+ 38: monitorexit
+ 39: athrow
+ 40: return
+ Exception table:
+ from to target type
+ 4 14 17 any
+ 17 19 17 any
+ 24 34 37 any
+ 37 39 37 any
+ LineNumberTable:
+ line 39: 0
+ line 40: 4
+ line 39: 12
+ line 42: 20
+ line 43: 24
+ line 42: 32
+ line 45: 40
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 41 0 this LInvestigation;
+
+ public void e();
+ org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8
+ 00 00 00 30 00 00 03 FFFFFF88
+ Code:
+ Stack=2, Locals=3, Args_size=1
+ 0: aload_0
+ 1: dup
+ 2: astore_1
+ 3: monitorenter
+ 4: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 7: ldc #28; //String hello
+ 9: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 12: new #58; //class java/lang/String
+ 15: dup
+ 16: invokespecial #59; //Method java/lang/String."<init>":()V
+ 19: dup
+ 20: astore_2
+ 21: monitorenter
+ 22: getstatic #26; //Field java/lang/System.out:Ljava/io/PrintStream;
+ 25: ldc #61; //String other
+ 27: invokevirtual #34; //Method java/io/PrintStream.println:(Ljava/lang/String;)V
+ 30: aload_2
+ 31: monitorexit
+ 32: goto 38
+ 35: aload_2
+ 36: monitorexit
+ 37: athrow
+ 38: aload_1
+ 39: monitorexit
+ 40: goto 46
+ 43: aload_1
+ 44: monitorexit
+ 45: athrow
+ 46: return
+ Exception table:
+ from to target type
+ 22 32 35 any
+ 35 37 35 any
+ 4 40 43 any
+ 43 45 43 any
+ LineNumberTable:
+ line 49: 0
+ line 50: 4
+ line 51: 12
+ line 52: 22
+ line 51: 30
+ line 49: 38
+ line 55: 46
+ LocalVariableTable:
+ Start Length Slot Name Signature
+ 0 47 0 this LInvestigation;
+
+ }
+*/
+
+} \ No newline at end of file
diff --git a/tests/features152/synchronization/transformed/Nine.java b/tests/features152/synchronization/transformed/Nine.java
new file mode 100644
index 000000000..8bd5fdf64
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Nine.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching lock on transformed static method (J5)
+
+public aspect Nine {
+ public static void main(String[] args) {
+ C.b();
+ }
+
+ before(): !within(Nine) && lock() {
+ System.err.println("Locking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/One.java b/tests/features152/synchronization/transformed/One.java
new file mode 100644
index 000000000..49a80c9d7
--- /dev/null
+++ b/tests/features152/synchronization/transformed/One.java
@@ -0,0 +1,39 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect One {
+ public static void main(String[] args) {
+
+ }
+
+ before(): call(* println(..)) {}
+
+ // ... that does something ...
+ public synchronized void b() {
+ System.out.println("hello");
+ }
+
+ // ... that includes try/catch ...
+ public synchronized void c() {
+ try {
+ File f = new File("fred");
+ FileInputStream fis = new FileInputStream(f);
+ } catch (IOException ioe) {
+ System.out.println("bang");
+ }
+ }
+
+ // ... with nested synchronized blocks ...
+ public synchronized void e() {
+ System.out.println("hello");
+ synchronized (new String()) {
+ System.out.println("other");
+ }
+ }
+
+}
+
+aspect OneX {
+ pointcut p(): lock();
+}
diff --git a/tests/features152/synchronization/transformed/OtherTargeters.java b/tests/features152/synchronization/transformed/OtherTargeters.java
new file mode 100644
index 000000000..e88a95f74
--- /dev/null
+++ b/tests/features152/synchronization/transformed/OtherTargeters.java
@@ -0,0 +1,25 @@
+public class OtherTargeters {
+ public static void main(String[] args) {
+ new OtherTargeters().foo();
+ }
+
+ // This method will have branch instructions that target a return which must be
+ // adjusted to target the monitor exit block
+ public synchronized void foo() {
+ int i = 35;
+ if (i==35) {
+ System.err.println("foo() running");
+ }
+ }
+
+ public void goo() {
+ int i = 35;
+ if (i==35) {
+ System.err.println("goo() running");
+ }
+ }
+}
+
+aspect X {
+ before(): execution(* foo(..)) {System.err.println("advice running");}
+} \ No newline at end of file
diff --git a/tests/features152/synchronization/transformed/Seven.java b/tests/features152/synchronization/transformed/Seven.java
new file mode 100644
index 000000000..6e786be63
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Seven.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching lock in a transformed non-static method...
+
+public aspect Seven {
+ public static void main(String[] args) {
+ new C().b();
+ }
+
+ before(): !within(Seven) && lock() {
+ System.err.println("Locking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Six.java b/tests/features152/synchronization/transformed/Six.java
new file mode 100644
index 000000000..71c800a4b
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Six.java
@@ -0,0 +1,26 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect Six {
+ public static void main(String[] args) {
+ C.bbb();
+ C.c();
+ }
+
+ before(): !within(Six) && call(* println(..)) { System.err.println("test");}
+}
+
+class C {
+ public static synchronized void bbb() {
+ System.err.println("hello");
+ }
+
+ public static void c() {
+ synchronized (C.class) {
+ System.err.println("hello");
+ }
+ }
+}
+
+aspect SixX { pointcut p(): unlock(); }
diff --git a/tests/features152/synchronization/transformed/Ten.java b/tests/features152/synchronization/transformed/Ten.java
new file mode 100644
index 000000000..9a7b54105
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Ten.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching unlock on transformed static method (J5)
+
+public aspect Ten {
+ public static void main(String[] args) {
+ C.b();
+ }
+
+ before(): !within(Ten) && unlock() {
+ System.err.println("Unlocking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Thirteen.java b/tests/features152/synchronization/transformed/Thirteen.java
new file mode 100644
index 000000000..82c71d0c6
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Thirteen.java
@@ -0,0 +1,6 @@
+interface I {
+
+ synchronized void foo();
+}
+public class Thirteen {
+}
diff --git a/tests/features152/synchronization/transformed/Three.java b/tests/features152/synchronization/transformed/Three.java
new file mode 100644
index 000000000..6a99c2e11
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Three.java
@@ -0,0 +1,44 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect Three {
+ public static void main(String[] args) {
+ new C().m3();
+ try {new C().m32(); } catch (MyException me) {int i=1;}
+ new C().m33();
+ try {new C().m34(); } catch (MyException me) {int i=1;}
+ }
+ after() returning: execution(* m3(..)) { System.err.println("execution advice running1");}
+ after() throwing: execution(* m32(..)) { System.err.println("execution advice running2");}
+ after() returning: execution(* m33(..)) { System.err.println("execution advice running3");}
+ after() throwing: execution(* m34(..)) { System.err.println("execution advice running4");}
+}
+
+class C {
+
+ public synchronized void m3() {
+ System.err.println("hello");
+ }
+
+ public synchronized void m32() {
+ System.err.println("hello");
+ throw new MyException();
+ }
+
+ public void m33() {
+ synchronized (this) {
+ System.err.println("hello");
+ }
+ }
+
+ public void m34() {
+ synchronized (this) {
+ System.err.println("hello");
+ throw new MyException();
+ }
+ }
+}
+ class MyException extends RuntimeException { }
+
+class ThreeX { pointcut p(): lock(); }
diff --git a/tests/features152/synchronization/transformed/Twelve.java b/tests/features152/synchronization/transformed/Twelve.java
new file mode 100644
index 000000000..f0016b5ef
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Twelve.java
@@ -0,0 +1,22 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+// matching unlock on transformed static method ( pre J5)
+
+public aspect Twelve {
+ public static void main(String[] args) {
+ C.b();
+ }
+
+ before(): !within(Twelve) && unlock() {
+ System.err.println("Unlocking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class C {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Two.java b/tests/features152/synchronization/transformed/Two.java
new file mode 100644
index 000000000..129222cd3
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Two.java
@@ -0,0 +1,19 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+public aspect Two {
+ public static void main(String[] args) {
+ new C().ma();
+ }
+ before(): execution(* ma(..)) { System.err.println("execution advice running");}
+}
+
+class C {
+
+ public synchronized void ma() {
+ System.err.println("hello");
+ }
+}
+
+aspect TwoX { pointcut p(): lock(); }
diff --git a/tests/features152/synchronization/transformed/expected/C.b.txt b/tests/features152/synchronization/transformed/expected/C.b.txt
new file mode 100644
index 000000000..15f85674d
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.b.txt
@@ -0,0 +1,22 @@
+ public static void b() org.aspectj.weaver.MethodDeclarationLineNumber: 17:340
+:
+ LDC C
+ DUP
+ ASTORE_0
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 18)
+ | LDC "hello"
+ | INVOKESTATIC Five.aspectOf ()LFive;
+ | INVOKEVIRTUAL Five.ajc$before$Five$1$af123de3 ()V
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_0
+ | MONITOREXIT
+ | RETURN (line 19)
+ finally -> E1
+ finally -> E1
+ | E1: ALOAD_0
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ end public static void b()
diff --git a/tests/features152/synchronization/transformed/expected/C.bbb.txt b/tests/features152/synchronization/transformed/expected/C.bbb.txt
new file mode 100644
index 000000000..b9f54d8eb
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.bbb.txt
@@ -0,0 +1,38 @@
+ public static void bbb() org.aspectj.weaver.MethodDeclarationLineNumber: 15:316
+:
+ GETSTATIC C.class$1 Ljava/lang/Class;
+ DUP
+ IFNONNULL L0
+ POP
+ catch java.lang.ClassNotFoundException -> E0
+ | LDC "C"
+ | INVOKESTATIC java.lang.Class.forName (Ljava/lang/String;)Ljava/lang/Class;
+ catch java.lang.ClassNotFoundException -> E0
+ DUP
+ PUTSTATIC C.class$1 Ljava/lang/Class;
+ GOTO L0
+ E0: NEW java.lang.NoClassDefFoundError
+ DUP_X1
+ SWAP
+ INVOKEVIRTUAL java.lang.Throwable.getMessage ()Ljava/lang/String;
+ INVOKESPECIAL java.lang.NoClassDefFoundError.<init> (Ljava/lang/String;)V
+ ATHROW
+ L0: DUP
+ ASTORE_0
+ MONITORENTER
+ finally -> E2
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 16)
+ | LDC "hello"
+ | INVOKESTATIC Six.aspectOf ()LSix;
+ | INVOKEVIRTUAL Six.ajc$before$Six$1$cb48297b ()V
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_0
+ | MONITOREXIT
+ | RETURN (line 17)
+ finally -> E2
+ finally -> E2
+ | E2: ALOAD_0
+ | MONITOREXIT
+ finally -> E2
+ ATHROW
+ end public static void bbb()
diff --git a/tests/features152/synchronization/transformed/expected/C.m.txt b/tests/features152/synchronization/transformed/expected/C.m.txt
new file mode 100644
index 000000000..7f5a34cdc
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m.txt
@@ -0,0 +1,23 @@
+ public void m() org.aspectj.weaver.MethodDeclarationLineNumber: 16:496
+:
+ ALOAD_0
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 17)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1
+ | MONITOREXIT
+ | GOTO L0 (line 18)
+ finally -> E1
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ L0: INVOKESTATIC Four.aspectOf ()LFour;
+ INVOKEVIRTUAL Four.ajc$afterReturning$Four$1$c2776aed ()V
+ RETURN
+ end public void m()
diff --git a/tests/features152/synchronization/transformed/expected/C.m2.txt b/tests/features152/synchronization/transformed/expected/C.m2.txt
new file mode 100644
index 000000000..ab4a19919
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m2.txt
@@ -0,0 +1,28 @@
+ public void m2() org.aspectj.weaver.MethodDeclarationLineNumber: 20:571
+:
+ catch java.lang.Throwable -> E2
+ | ALOAD_0
+ | DUP
+ | ASTORE_1
+ | MONITORENTER
+ | finally -> E1
+ | | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 21)
+ | | LDC "hello"
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | NEW MyException (line 22)
+ | | DUP
+ | | INVOKESPECIAL MyException.<init> ()V
+ | | ATHROW
+ | finally -> E1
+ | finally -> E1
+ | | E1: ALOAD_1
+ | | MONITOREXIT
+ | finally -> E1
+ | ATHROW
+ catch java.lang.Throwable -> E2
+ E2: ASTORE_2
+ INVOKESTATIC Four.aspectOf ()LFour;
+ INVOKEVIRTUAL Four.ajc$afterThrowing$Four$2$9d31eed1 ()V
+ ALOAD_2
+ ATHROW
+ end public void m2()
diff --git a/tests/features152/synchronization/transformed/expected/C.m3.txt b/tests/features152/synchronization/transformed/expected/C.m3.txt
new file mode 100644
index 000000000..f1157285e
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m3.txt
@@ -0,0 +1,23 @@
+ public void m3() org.aspectj.weaver.MethodDeclarationLineNumber: 20:747
+:
+ ALOAD_0
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 21)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1
+ | MONITOREXIT
+ | GOTO L0 (line 22)
+ finally -> E1
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ L0: INVOKESTATIC Three.aspectOf ()LThree;
+ INVOKEVIRTUAL Three.ajc$afterReturning$Three$1$3f09355c ()V
+ RETURN
+ end public void m3()
diff --git a/tests/features152/synchronization/transformed/expected/C.m32.txt b/tests/features152/synchronization/transformed/expected/C.m32.txt
new file mode 100644
index 000000000..0e2819293
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m32.txt
@@ -0,0 +1,28 @@
+ public void m32() org.aspectj.weaver.MethodDeclarationLineNumber: 24:823
+:
+ catch java.lang.Throwable -> E2
+ | ALOAD_0
+ | DUP
+ | ASTORE_1
+ | MONITORENTER
+ | finally -> E1
+ | | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 25)
+ | | LDC "hello"
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | NEW MyException (line 26)
+ | | DUP
+ | | INVOKESPECIAL MyException.<init> ()V
+ | | ATHROW
+ | finally -> E1
+ | finally -> E1
+ | | E1: ALOAD_1
+ | | MONITOREXIT
+ | finally -> E1
+ | ATHROW
+ catch java.lang.Throwable -> E2
+ E2: ASTORE_2
+ INVOKESTATIC Three.aspectOf ()LThree;
+ INVOKEVIRTUAL Three.ajc$afterThrowing$Three$2$b2d97242 ()V
+ ALOAD_2
+ ATHROW
+ end public void m32()
diff --git a/tests/features152/synchronization/transformed/expected/C.m33.txt b/tests/features152/synchronization/transformed/expected/C.m33.txt
new file mode 100644
index 000000000..86b78ffb3
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m33.txt
@@ -0,0 +1,24 @@
+ public void m33() org.aspectj.weaver.MethodDeclarationLineNumber: 29:917
+:
+ ALOAD_0 // LC; this (line 30)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 31)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1 (line 30)
+ | MONITOREXIT
+ finally -> E1
+ GOTO L0
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ L0: GOTO L1 (line 33)
+ L1: INVOKESTATIC Three.aspectOf ()LThree;
+ INVOKEVIRTUAL Three.ajc$afterReturning$Three$3$b48e4ae1 ()V
+ RETURN
+ end public void m33()
diff --git a/tests/features152/synchronization/transformed/expected/C.m34.txt b/tests/features152/synchronization/transformed/expected/C.m34.txt
new file mode 100644
index 000000000..c787ba249
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m34.txt
@@ -0,0 +1,26 @@
+ public void m34() org.aspectj.weaver.MethodDeclarationLineNumber: 35:1018
+:
+ catch java.lang.Throwable -> E1
+ | ALOAD_0 // LC; this (line 36)
+ | DUP
+ | ASTORE_1
+ | MONITORENTER
+ | finally -> E0
+ | | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 37)
+ | | LDC "hello"
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | NEW MyException (line 38)
+ | | DUP
+ | | INVOKESPECIAL MyException.<init> ()V
+ | | ATHROW
+ | | E0: ALOAD_1 (line 36)
+ | | MONITOREXIT
+ | finally -> E0
+ | ATHROW
+ catch java.lang.Throwable -> E1
+ E1: ASTORE_2
+ INVOKESTATIC Three.aspectOf ()LThree;
+ INVOKEVIRTUAL Three.ajc$afterThrowing$Three$4$b6432380 ()V
+ ALOAD_2
+ ATHROW
+ end public void m34()
diff --git a/tests/features152/synchronization/transformed/expected/C.m4.txt b/tests/features152/synchronization/transformed/expected/C.m4.txt
new file mode 100644
index 000000000..9e50085ea
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.m4.txt
@@ -0,0 +1,26 @@
+ public void m4() org.aspectj.weaver.MethodDeclarationLineNumber: 35:1007
+:
+ catch java.lang.Throwable -> E1
+ | ALOAD_0 // LC; this (line 36)
+ | DUP
+ | ASTORE_1
+ | MONITORENTER
+ | finally -> E0
+ | | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 37)
+ | | LDC "hello"
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | NEW MyException (line 38)
+ | | DUP
+ | | INVOKESPECIAL MyException.<init> ()V
+ | | ATHROW
+ | | E0: ALOAD_1 (line 36)
+ | | MONITOREXIT
+ | finally -> E0
+ | ATHROW
+ catch java.lang.Throwable -> E1
+ E1: ASTORE_2
+ INVOKESTATIC Three.aspectOf ()LThree;
+ INVOKEVIRTUAL Three.ajc$afterThrowing$Three$4$40be0dfb ()V
+ ALOAD_2
+ ATHROW
+ end public void m4()
diff --git a/tests/features152/synchronization/transformed/expected/C.ma.txt b/tests/features152/synchronization/transformed/expected/C.ma.txt
new file mode 100644
index 000000000..0a6b97849
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/C.ma.txt
@@ -0,0 +1,22 @@
+ public void ma() org.aspectj.weaver.MethodDeclarationLineNumber: 14:307
+:
+ INVOKESTATIC Two.aspectOf ()LTwo;
+ INVOKEVIRTUAL Two.ajc$before$Two$1$8d8821ee ()V
+ ALOAD_0
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.err Ljava/io/PrintStream; (line 15)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1
+ | MONITOREXIT
+ | RETURN (line 16)
+ finally -> E1
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ end public void ma()
diff --git a/tests/features152/synchronization/transformed/expected/Investigation.b.txt b/tests/features152/synchronization/transformed/expected/Investigation.b.txt
new file mode 100644
index 000000000..15f83a1d6
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/Investigation.b.txt
@@ -0,0 +1,21 @@
+ public void b() org.aspectj.weaver.MethodDeclarationLineNumber: 19:312
+:
+ ALOAD_0 // LInvestigation; this (line 20)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 21)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1 (line 20)
+ | MONITOREXIT
+ finally -> E1
+ GOTO L0
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ L0: RETURN (line 23)
+ end public void b()
diff --git a/tests/features152/synchronization/transformed/expected/Investigation.c.txt b/tests/features152/synchronization/transformed/expected/Investigation.c.txt
new file mode 100644
index 000000000..7fa235d5d
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/Investigation.c.txt
@@ -0,0 +1,35 @@
+ public void c() org.aspectj.weaver.MethodDeclarationLineNumber: 26:439
+:
+ ALOAD_0 // LInvestigation; this (line 27)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E2
+ | catch java.io.IOException -> E0
+ | | NEW java.io.File (line 29)
+ | | DUP
+ | | LDC "fred"
+ | | INVOKESPECIAL java.io.File.<init> (Ljava/lang/String;)V
+ | | ASTORE_2
+ | | NEW java.io.FileInputStream (line 30)
+ | | DUP
+ | | ALOAD_2 // Ljava/io/File; f
+ | | INVOKESPECIAL java.io.FileInputStream.<init> (Ljava/io/File;)V
+ | | POP
+ | | GOTO L0
+ | catch java.io.IOException -> E0
+ | E0: POP (line 31)
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 32)
+ | LDC "bang"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | L0: ALOAD_1 (line 27)
+ | MONITOREXIT
+ finally -> E2
+ GOTO L1
+ finally -> E2
+ | E2: ALOAD_1
+ | MONITOREXIT
+ finally -> E2
+ ATHROW
+ L1: RETURN (line 35)
+ end public void c()
diff --git a/tests/features152/synchronization/transformed/expected/Investigation.d.txt b/tests/features152/synchronization/transformed/expected/Investigation.d.txt
new file mode 100644
index 000000000..a2a73c36a
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/Investigation.d.txt
@@ -0,0 +1,38 @@
+ public void d() org.aspectj.weaver.MethodDeclarationLineNumber: 38:706
+:
+ ALOAD_0 // LInvestigation; this (line 39)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 40)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1 (line 39)
+ | MONITOREXIT
+ finally -> E1
+ GOTO L0
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ L0: ALOAD_0 // LInvestigation; this (line 42)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E3
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 43)
+ | LDC "world"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1 (line 42)
+ | MONITOREXIT
+ finally -> E3
+ GOTO L1
+ finally -> E3
+ | E3: ALOAD_1
+ | MONITOREXIT
+ finally -> E3
+ ATHROW
+ L1: RETURN (line 45)
+ end public void d()
diff --git a/tests/features152/synchronization/transformed/expected/Investigation.e.txt b/tests/features152/synchronization/transformed/expected/Investigation.e.txt
new file mode 100644
index 000000000..6508daf3a
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/Investigation.e.txt
@@ -0,0 +1,40 @@
+ public void e() org.aspectj.weaver.MethodDeclarationLineNumber: 48:904
+:
+ ALOAD_0 // LInvestigation; this (line 49)
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E3
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 50)
+ | LDC "hello"
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | NEW java.lang.String (line 51)
+ | DUP
+ | INVOKESPECIAL java.lang.String.<init> ()V
+ | DUP
+ | ASTORE_2
+ | MONITORENTER
+ | finally -> E1
+ | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 52)
+ | | LDC "other"
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | ALOAD_2 (line 51)
+ | | MONITOREXIT
+ | finally -> E1
+ | GOTO L0
+ | finally -> E1
+ | | E1: ALOAD_2
+ | | MONITOREXIT
+ | finally -> E1
+ | ATHROW
+ | L0: ALOAD_1 (line 49)
+ | MONITOREXIT
+ finally -> E3
+ GOTO L1
+ finally -> E3
+ | E3: ALOAD_1
+ | MONITOREXIT
+ finally -> E3
+ ATHROW
+ L1: RETURN (line 55)
+ end public void e()
diff --git a/tests/features152/synchronization/transformed/expected/One.b.txt b/tests/features152/synchronization/transformed/expected/One.b.txt
new file mode 100644
index 000000000..948cb66cd
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/One.b.txt
@@ -0,0 +1,22 @@
+ public void b() org.aspectj.weaver.MethodDeclarationLineNumber: 13:259
+:
+ ALOAD_0
+ DUP
+ ASTORE_1
+ MONITORENTER
+ finally -> E1
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 14)
+ | LDC "hello"
+ | INVOKESTATIC One.aspectOf ()LOne;
+ | INVOKEVIRTUAL One.ajc$before$One$1$d2a8f7b9 ()V
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | ALOAD_1
+ | MONITOREXIT
+ | RETURN (line 15)
+ finally -> E1
+ finally -> E1
+ | E1: ALOAD_1
+ | MONITOREXIT
+ finally -> E1
+ ATHROW
+ end public void b()
diff --git a/tests/features152/synchronization/transformed/expected/One.c.txt b/tests/features152/synchronization/transformed/expected/One.c.txt
new file mode 100644
index 000000000..3641c9b36
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/One.c.txt
@@ -0,0 +1,36 @@
+ public void c() org.aspectj.weaver.MethodDeclarationLineNumber: 18:368
+:
+ ALOAD_0
+ DUP
+ ASTORE_2
+ MONITORENTER
+ finally -> E2
+ | catch java.io.IOException -> E0
+ | | NEW java.io.File (line 20)
+ | | DUP
+ | | LDC "fred"
+ | | INVOKESPECIAL java.io.File.<init> (Ljava/lang/String;)V
+ | | ASTORE_1
+ | | NEW java.io.FileInputStream (line 21)
+ | | DUP
+ | | ALOAD_1 // Ljava/io/File; f
+ | | INVOKESPECIAL java.io.FileInputStream.<init> (Ljava/io/File;)V
+ | | POP
+ | | GOTO L0
+ | catch java.io.IOException -> E0
+ | E0: POP (line 22)
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 23)
+ | LDC "bang"
+ | INVOKESTATIC One.aspectOf ()LOne;
+ | INVOKEVIRTUAL One.ajc$before$One$1$d2a8f7b9 ()V
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | L0: ALOAD_2
+ | MONITOREXIT
+ | RETURN (line 25)
+ finally -> E2
+ finally -> E2
+ | E2: ALOAD_2
+ | MONITOREXIT
+ finally -> E2
+ ATHROW
+ end public void c()
diff --git a/tests/features152/synchronization/transformed/expected/One.e.txt b/tests/features152/synchronization/transformed/expected/One.e.txt
new file mode 100644
index 000000000..85d93f0ed
--- /dev/null
+++ b/tests/features152/synchronization/transformed/expected/One.e.txt
@@ -0,0 +1,43 @@
+ public void e() org.aspectj.weaver.MethodDeclarationLineNumber: 28:611
+:
+ ALOAD_0
+ DUP
+ ASTORE_2
+ MONITORENTER
+ finally -> E3
+ | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 29)
+ | LDC "hello"
+ | INVOKESTATIC One.aspectOf ()LOne;
+ | INVOKEVIRTUAL One.ajc$before$One$1$d2a8f7b9 ()V
+ | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | NEW java.lang.String (line 30)
+ | DUP
+ | INVOKESPECIAL java.lang.String.<init> ()V
+ | DUP
+ | ASTORE_1
+ | MONITORENTER
+ | finally -> E1
+ | | GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line 31)
+ | | LDC "other"
+ | | INVOKESTATIC One.aspectOf ()LOne;
+ | | INVOKEVIRTUAL One.ajc$before$One$1$d2a8f7b9 ()V
+ | | INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
+ | | ALOAD_1 (line 30)
+ | | MONITOREXIT
+ | finally -> E1
+ | GOTO L0
+ | finally -> E1
+ | | E1: ALOAD_1
+ | | MONITOREXIT
+ | finally -> E1
+ | ATHROW
+ | L0: ALOAD_2
+ | MONITOREXIT
+ | RETURN (line 33)
+ finally -> E3
+ finally -> E3
+ | E3: ALOAD_2
+ | MONITOREXIT
+ finally -> E3
+ ATHROW
+ end public void e()