]> source.dussan.org Git - aspectj.git/commitdiff
fix for problem with transform of static synchronized method on pre Java5.
authoraclement <aclement>
Thu, 3 Aug 2006 07:35:18 +0000 (07:35 +0000)
committeraclement <aclement>
Thu, 3 Aug 2006 07:35:18 +0000 (07:35 +0000)
tests/features152/synchronization/transformed/Fifteen.java [new file with mode: 0644]
tests/features152/synchronization/transformed/Sixteen.java [new file with mode: 0644]

diff --git a/tests/features152/synchronization/transformed/Fifteen.java b/tests/features152/synchronization/transformed/Fifteen.java
new file mode 100644 (file)
index 0000000..51d6dc4
--- /dev/null
@@ -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 (file)
index 0000000..7a5900c
--- /dev/null
@@ -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");
+  }
+}