aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/GetterLazyArguments.java
blob: 604513cd885292eafcad49fdeac31fe60e9fc09c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// version 8:
class GetterLazyArguments {
	static String fun() {
		return null;
	}

	static String stringInt(String arg1, Integer arg2) {
		return null;
	}

	static String stringRunnable(String arg1, Runnable arg2) {
		return null;
	}

	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field1 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field2 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field3 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field4 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field5 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();

	@java.lang.SuppressWarnings({"all", "unchecked"})
	public String getField1() {
		java.lang.Object value = this.field1.get();
		if (value == null) {
			synchronized (this.field1) {
				value = this.field1.get();
				if (value == null) {
					final String actualValue = stringInt(("a"), (1));
					value = actualValue == null ? this.field1 : actualValue;
					this.field1.set(value);
				}
			}
		}
		return (String) (value == this.field1 ? null : value);
	}

	@java.lang.SuppressWarnings({"all", "unchecked"})
	public String getField2() {
		java.lang.Object value = this.field2.get();
		if (value == null) {
			synchronized (this.field2) {
				value = this.field2.get();
				if (value == null) {
					final String actualValue = stringInt(true ? "a" : "b", true ? 1 : 0);
					value = actualValue == null ? this.field2 : actualValue;
					this.field2.set(value);
				}
			}
		}
		return (String) (value == this.field2 ? null : value);
	}

	@java.lang.SuppressWarnings({"all", "unchecked"})
	public String getField3() {
		java.lang.Object value = this.field3.get();
		if (value == null) {
			synchronized (this.field3) {
				value = this.field3.get();
				if (value == null) {
					final String actualValue = stringInt(("a"), true ? 1 : 0);
					value = actualValue == null ? this.field3 : actualValue;
					this.field3.set(value);
				}
			}
		}
		return (String) (value == this.field3 ? null : value);
	}

	@java.lang.SuppressWarnings({"all", "unchecked"})
	public String getField4() {
		java.lang.Object value = this.field4.get();
		if (value == null) {
			synchronized (this.field4) {
				value = this.field4.get();
				if (value == null) {
					final String actualValue = stringRunnable(fun(), () -> {
					});
					value = actualValue == null ? this.field4 : actualValue;
					this.field4.set(value);
				}
			}
		}
		return (String) (value == this.field4 ? null : value);
	}

	@java.lang.SuppressWarnings({"all", "unchecked"})
	public String getField5() {
		java.lang.Object value = this.field5.get();
		if (value == null) {
			synchronized (this.field5) {
				value = this.field5.get();
				if (value == null) {
					final String actualValue = stringRunnable(("a"), () -> {
					});
					value = actualValue == null ? this.field5 : actualValue;
					this.field5.set(value);
				}
			}
		}
		return (String) (value == this.field5 ? null : value);
	}
}