diff options
Diffstat (limited to 'test/lombok/resource/after/SynchronizedPlain.java')
-rw-r--r-- | test/lombok/resource/after/SynchronizedPlain.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/lombok/resource/after/SynchronizedPlain.java b/test/lombok/resource/after/SynchronizedPlain.java new file mode 100644 index 00000000..2c168368 --- /dev/null +++ b/test/lombok/resource/after/SynchronizedPlain.java @@ -0,0 +1,26 @@ +class SynchronizedPlain1 { + private final Object $lock = new Object[0]; + void test() { + synchronized ($lock) { + System.out.println("one"); + } + } + void test2() { + synchronized ($lock) { + System.out.println("two"); + } + } +} +class SynchronizedPlain2 { + private static final Object $LOCK = new Object[0]; + static void test() { + synchronized ($LOCK) { + System.out.println("three"); + } + } + static void test2() { + synchronized ($LOCK) { + System.out.println("four"); + } + } +}
\ No newline at end of file |