aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/NonNullExample_post.jpage
blob: bb67b3f6b408950732c5a53a3d0b2b2385006f3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import lombok.NonNull;

public class NonNullExample extends Something {
	private String name;
	
	public NonNullExample(@NonNull Person person) {
		super("Hello");
		if (person == null) {
			throw new NullPointerException("person is marked @NonNull but is null");
		}
		this.name = person.getName();
	}
}