aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/NonNullWithGuava.java
blob: dc877daa503ac6d3ab15bb4afdf47c4e9da07a0b (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
//CONF: lombok.nonNull.exceptionType = Guava
import static com.google.common.base.Preconditions.*;
public class NonNullWithGuava {
	@lombok.NonNull @lombok.Setter private String test;

	public void testMethod(@lombok.NonNull String arg) {
		System.out.println(arg);
	}

	public void testMethodWithCheck1(@lombok.NonNull String arg) {
		checkNotNull(arg);
	}

	public void testMethodWithCheckAssign(@lombok.NonNull String arg) {
		test = checkNotNull(arg);
	}

	public void testMethodWithCheck2(@lombok.NonNull String arg) {
		com.google.common.base.Preconditions.checkNotNull(arg);
	}

	public void testMethodWithFakeCheck1(@lombok.NonNull String arg) {
		checkNotNull("");
	}

	public void testMethodWithFakeCheck2(@lombok.NonNull String arg) {
		com.google.common.base.Preconditions.checkNotNull(test);
	}
	
	public void testMethodWithFakeCheckAssign(@lombok.NonNull String arg) {
		test = checkNotNull(test);
	}
}