diff options
Diffstat (limited to 'tests/features152/synchronization/ParsingAndMatching4.java')
-rw-r--r-- | tests/features152/synchronization/ParsingAndMatching4.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/features152/synchronization/ParsingAndMatching4.java b/tests/features152/synchronization/ParsingAndMatching4.java new file mode 100644 index 000000000..4fe3c6f5d --- /dev/null +++ b/tests/features152/synchronization/ParsingAndMatching4.java @@ -0,0 +1,20 @@ +// unlock and non-static context + +public aspect ParsingAndMatching4 { + + before(): unlock() { + System.err.println("Advice running at "+thisJoinPoint.getSourceLocation()); + } + + public static void main(String[] args) { + new Foo().nonstaticM(); + } + + static class Foo { + public void nonstaticM() { + synchronized (String.class) { + System.err.println("non-static method running"); + } + } + } +}
\ No newline at end of file |