diff options
Diffstat (limited to 'tests/features152/synchronization/transformed/Fifteen.java')
-rw-r--r-- | tests/features152/synchronization/transformed/Fifteen.java | 22 |
1 files changed, 22 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"); + } +} |