aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/NonNullExample_post.jpage
diff options
context:
space:
mode:
Diffstat (limited to 'website/usageExamples/NonNullExample_post.jpage')
-rw-r--r--website/usageExamples/NonNullExample_post.jpage13
1 files changed, 13 insertions, 0 deletions
diff --git a/website/usageExamples/NonNullExample_post.jpage b/website/usageExamples/NonNullExample_post.jpage
new file mode 100644
index 00000000..24175e06
--- /dev/null
+++ b/website/usageExamples/NonNullExample_post.jpage
@@ -0,0 +1,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");
+ }
+ this.name = person.getName();
+ }
+}