diff options
Diffstat (limited to 'test/transform/resource/after-delombok')
3 files changed, 20 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/SynchronizedName.java b/test/transform/resource/after-delombok/SynchronizedName.java index 91fd7ea7..9c160166 100644 --- a/test/transform/resource/after-delombok/SynchronizedName.java +++ b/test/transform/resource/after-delombok/SynchronizedName.java @@ -8,7 +8,7 @@ class SynchronizedName { } } void test4() { - synchronized (this.READ) { + synchronized (SynchronizedName.READ) { System.out.println("four"); } } diff --git a/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java index effa036f..2bc056e9 100644 --- a/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java +++ b/test/transform/resource/after-delombok/SynchronizedNameStaticToInstanceRef.java @@ -2,8 +2,6 @@ class SynchronizedNameStaticToInstanceRef { private Object read = new Object(); private static Object READ = new Object(); static void test3() { - synchronized (SynchronizedNameStaticToInstanceRef.read) { - System.out.println("three"); - } + System.out.println("three"); } } diff --git a/test/transform/resource/after-delombok/SynchronizedOnStatic.java b/test/transform/resource/after-delombok/SynchronizedOnStatic.java new file mode 100644 index 00000000..30ec16f7 --- /dev/null +++ b/test/transform/resource/after-delombok/SynchronizedOnStatic.java @@ -0,0 +1,18 @@ +class SynchronizedOnStatic<Z> { + static class Inner { + private static Object LCK = new Object[0]; + public void foo() { + synchronized (SynchronizedOnStatic.Inner.LCK) { + System.out.println(); + } + } + } + class Inner2 { + private Object LCK = new Object[0]; + public void foo() { + synchronized (this.LCK) { + System.out.println(); + } + } + } +}
\ No newline at end of file |