diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
3 files changed, 33 insertions, 5 deletions
diff --git a/test/transform/resource/after-ecj/SynchronizedName.java b/test/transform/resource/after-ecj/SynchronizedName.java index b7474373..f2c3fea3 100644 --- a/test/transform/resource/after-ecj/SynchronizedName.java +++ b/test/transform/resource/after-ecj/SynchronizedName.java @@ -13,7 +13,7 @@ class SynchronizedName { } } @lombok.Synchronized("READ") void test4() { - synchronized (this.READ) + synchronized (SynchronizedName.READ) { System.out.println("four"); } diff --git a/test/transform/resource/after-ecj/SynchronizedNameStaticToInstanceRef.java b/test/transform/resource/after-ecj/SynchronizedNameStaticToInstanceRef.java index 103c714c..72557c4b 100644 --- a/test/transform/resource/after-ecj/SynchronizedNameStaticToInstanceRef.java +++ b/test/transform/resource/after-ecj/SynchronizedNameStaticToInstanceRef.java @@ -7,9 +7,6 @@ class SynchronizedNameStaticToInstanceRef { super(); } static @lombok.Synchronized("read") void test3() { - synchronized (SynchronizedNameStaticToInstanceRef.read) - { - System.out.println("three"); - } + System.out.println("three"); } } diff --git a/test/transform/resource/after-ecj/SynchronizedOnStatic.java b/test/transform/resource/after-ecj/SynchronizedOnStatic.java new file mode 100644 index 00000000..20dd3514 --- /dev/null +++ b/test/transform/resource/after-ecj/SynchronizedOnStatic.java @@ -0,0 +1,31 @@ +class SynchronizedOnStatic<Z> { + static class Inner { + private static Object LCK = new Object[0]; + <clinit>() { + } + Inner() { + super(); + } + public @lombok.Synchronized("LCK") void foo() { + synchronized (SynchronizedOnStatic.Inner.LCK) + { + System.out.println(); + } + } + } + class Inner2 { + private Object LCK = new Object[0]; + Inner2() { + super(); + } + public @lombok.Synchronized("LCK") void foo() { + synchronized (this.LCK) + { + System.out.println(); + } + } + } + SynchronizedOnStatic() { + super(); + } +}
\ No newline at end of file |