summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/Twelve.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features152/synchronization/transformed/Twelve.java')
-rw-r--r--tests/features152/synchronization/transformed/Twelve.java22
1 files changed, 22 insertions, 0 deletions
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");
+ }
+}