summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/OtherTargeters.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features152/synchronization/transformed/OtherTargeters.java')
-rw-r--r--tests/features152/synchronization/transformed/OtherTargeters.java25
1 files changed, 25 insertions, 0 deletions
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