aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/GetterLazy.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok/GetterLazy.java')
-rw-r--r--test/transform/resource/after-delombok/GetterLazy.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/GetterLazy.java b/test/transform/resource/after-delombok/GetterLazy.java
new file mode 100644
index 00000000..d7f97f0d
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazy.java
@@ -0,0 +1,19 @@
+class GetterLazy {
+ static class ValueType {
+ }
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>> fieldName = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>>();
+ @java.lang.SuppressWarnings("all")
+ public ValueType getFieldName() {
+ java.util.concurrent.atomic.AtomicReference<ValueType> value = this.fieldName.get();
+ if (value == null) {
+ synchronized (this.fieldName) {
+ value = this.fieldName.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<ValueType>(new ValueType());
+ this.fieldName.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+}