aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to 'website')
-rw-r--r--website/templates/features/NonNull.html2
-rw-r--r--website/templates/features/ToString.html5
-rw-r--r--website/templates/setup/eclipse.html2
-rw-r--r--website/usageExamples/NonNullExample_post.jpage2
-rw-r--r--website/usageExamples/WithExample_pre.jpage3
5 files changed, 10 insertions, 4 deletions
diff --git a/website/templates/features/NonNull.html b/website/templates/features/NonNull.html
index 57aa62fe..cccc69fa 100644
--- a/website/templates/features/NonNull.html
+++ b/website/templates/features/NonNull.html
@@ -11,7 +11,7 @@
</p><p>
Lombok has always treated various annotations generally named <code>@NonNull</code> on a field as a signal to generate a null-check if lombok generates an entire method or constructor for you, via for example <a href="/features/Data"><code>@Data</code></a>. However, using lombok's own <code>@lombok.NonNull</code> on a parameter or record component results in the insertion of the null-check at the top of that method.
</p><p>
- The null-check looks like <code>if (param == null) throw new NullPointerException("param is marked @NonNull but is null");</code> and will be inserted at the very top of your method. For constructors, the null-check will be inserted immediately following any explicit <code>this()</code> or <code>super()</code> calls. For record components, the null-check will be inserted in the 'compact constructor' (the one that has no argument list at all), which will be generated if you have no constructor. If you have written out the record constructor in long form (with parameters matching your components exactly), then nothing happens - you'd have to annotate the parameters of this long-form constructor instead.
+ The null-check looks like <code>if (param == null) throw new NullPointerException("param is marked non-null but is null");</code> and will be inserted at the very top of your method. For constructors, the null-check will be inserted immediately following any explicit <code>this()</code> or <code>super()</code> calls. For record components, the null-check will be inserted in the 'compact constructor' (the one that has no argument list at all), which will be generated if you have no constructor. If you have written out the record constructor in long form (with parameters matching your components exactly), then nothing happens - you'd have to annotate the parameters of this long-form constructor instead.
</p><p>
If a null-check is already present at the top, no additional null-check will be generated.
</p>
diff --git a/website/templates/features/ToString.html b/website/templates/features/ToString.html
index 456092d5..87e06649 100644
--- a/website/templates/features/ToString.html
+++ b/website/templates/features/ToString.html
@@ -33,6 +33,11 @@
</dt><dd>
If set to <code>call</code>, lombok will generate calls to the superclass implementation of <code>toString</code> if your class extends something. If set to <code>skip</code> no such call is generated. If set to <code>warn</code> no such call is generated either, but lombok does generate a warning to tell you about it.
</dd><dt>
+ <code>lombok.toString.onlyExplicitlyIncluded</code> = [<code>true</code> | <code>false</code>] (default: false)
+ </dt><dd>
+ If set to <code>false</code> (default), all fields (unless <code>static</code>, name starts with a dollar, or otherwise excluded for obvious reasons) serve as the default set of things to include in the toString, modifiable by using the <code>@ToString.Exclude</code> and <code>@ToString.Include</code> options.
+ If set to <code>true</code>, nothing is included unless explicitly marked with <code>@ToString.Include</code>.
+ </dd><dt>
<code>lombok.toString.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)
</dt><dd>
Lombok will flag any usage of <code>@ToString</code> as a warning or error if configured.
diff --git a/website/templates/setup/eclipse.html b/website/templates/setup/eclipse.html
index d9621501..72160446 100644
--- a/website/templates/setup/eclipse.html
+++ b/website/templates/setup/eclipse.html
@@ -34,5 +34,7 @@
<br />
<img width="626" height="216" src="/img/eclipse-p2-step2.png" />
</p>
+ <p><strong>NB: You need to actually quit Eclipse and start it again; the regular restart is not good enough.</strong>
+ </p>
</@s.section>
</@s.scaffold>
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;
}