aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/GetterLazy.java
blob: d7f97f0d333e677c58d9bca9d3513d4356673655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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();
	}
}