diff options
Diffstat (limited to 'website/usageExamples')
-rw-r--r-- | website/usageExamples/NonNullExample_post.jpage | 2 | ||||
-rw-r--r-- | website/usageExamples/WithExample_pre.jpage | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/website/usageExamples/NonNullExample_post.jpage b/website/usageExamples/NonNullExample_post.jpage index bb67b3f6..ff3c2dc3 100644 --- a/website/usageExamples/NonNullExample_post.jpage +++ b/website/usageExamples/NonNullExample_post.jpage @@ -6,7 +6,7 @@ public class NonNullExample extends Something { public NonNullExample(@NonNull Person person) { super("Hello"); if (person == null) { - throw new NullPointerException("person is marked @NonNull but is null"); + throw new NullPointerException("person is marked non-null but is null"); } this.name = person.getName(); } diff --git a/website/usageExamples/WithExample_pre.jpage b/website/usageExamples/WithExample_pre.jpage index 2f78020a..f03ee891 100644 --- a/website/usageExamples/WithExample_pre.jpage +++ b/website/usageExamples/WithExample_pre.jpage @@ -6,8 +6,7 @@ public class WithExample { @With(AccessLevel.PROTECTED) @NonNull private final String name; @With private final int age; - public WithExample(String name, int age) { - if (name == null) throw new NullPointerException(); + public WithExample(@NonNull String name, int age) { this.name = name; this.age = age; } |