aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/SkipSuppressWarnings.java
blob: 151d4e1772040f58e75a4bdfac882a4cc2479070 (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
class SkipSuppressWarnings {
	private String field = "";
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> field2 = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();

	public String getField() {
		return this.field;
	}

	@java.lang.SuppressWarnings({"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 = "";
					value = actualValue == null ? this.field2 : actualValue;
					this.field2.set(value);
				}
			}
		}
		return (String) (value == this.field2 ? null : value);
	}
}