aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java')
-rw-r--r--test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java b/test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java
new file mode 100644
index 00000000..ab8bc599
--- /dev/null
+++ b/test/transform/resource/after-ecj/GetterLazyInAnonymousClass.java
@@ -0,0 +1,34 @@
+import lombok.Getter;
+public class GetterLazyInAnonymousClass {
+ Object annonymous = new Object() {
+ class Inner {
+ private final @Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.lang.Object> string = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
+ Inner() {
+ super();
+ }
+ public @java.lang.SuppressWarnings({"all", "unchecked"}) String getString() {
+ java.lang.Object value = this.string.get();
+ if ((value == null))
+ {
+ synchronized (this.string)
+ {
+ value = this.string.get();
+ if ((value == null))
+ {
+ final String actualValue = "test";
+ value = ((actualValue == null) ? this.string : actualValue);
+ this.string.set(value);
+ }
+ }
+ }
+ return (String) ((value == this.string) ? null : value);
+ }
+ }
+ x() {
+ super();
+ }
+ };
+ public GetterLazyInAnonymousClass() {
+ super();
+ }
+}