aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/NonNullExample_post.jpage
blob: ff3c2dc3e85c5effc70e7797d17d830b3386d3e3 (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 non-null but is null");
		}
		this.name = person.getName();
	}
}