summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-03 07:35:18 +0000
committeraclement <aclement>2006-08-03 07:35:18 +0000
commite38e83903795e8904c92144c67e1674ccb30df82 (patch)
tree460d63bff932ddbf126186389c723a9b71d7f173 /tests/features152/synchronization
parent9664058bcdaeb4934a01969f4e5f651bc6e8cd71 (diff)
downloadaspectj-e38e83903795e8904c92144c67e1674ccb30df82.tar.gz
aspectj-e38e83903795e8904c92144c67e1674ccb30df82.zip
fix for problem with transform of static synchronized method on pre Java5.
Diffstat (limited to 'tests/features152/synchronization')
-rw-r--r--tests/features152/synchronization/transformed/Fifteen.java22
-rw-r--r--tests/features152/synchronization/transformed/Sixteen.java25
2 files changed, 47 insertions, 0 deletions
diff --git a/tests/features152/synchronization/transformed/Fifteen.java b/tests/features152/synchronization/transformed/Fifteen.java
new file mode 100644
index 000000000..51d6dc4f4
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Fifteen.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 Fifteen {
+ public static void main(String[] args) {
+ Blah.b();
+ }
+
+ before(): !within(Fifteen) && lock() {
+ System.err.println("Locking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class Blah {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}
diff --git a/tests/features152/synchronization/transformed/Sixteen.java b/tests/features152/synchronization/transformed/Sixteen.java
new file mode 100644
index 000000000..7a5900cb2
--- /dev/null
+++ b/tests/features152/synchronization/transformed/Sixteen.java
@@ -0,0 +1,25 @@
+package a.b.c.d;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+
+// matching lock on transformed static method ( pre J5)
+
+public aspect Sixteen {
+ public static void main(String[] args) {
+ Blah.b();
+ }
+
+ before(): !within(Sixteen) && lock() {
+ System.err.println("Locking occurring at "+thisJoinPoint);
+ System.err.println(thisJoinPoint.getSourceLocation().getFileName());
+ }
+}
+
+class Blah {
+ public static synchronized void b() {
+ System.err.println("hello");
+ }
+}