aboutsummaryrefslogtreecommitdiff
path: root/website/features/NonNull.html
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2014-05-27 20:29:54 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2014-05-27 20:29:54 +0200
commit713822db9894cf99184aff57b3387f99846aa870 (patch)
tree7b5ee62283336897fda2b4b84f5c1472358b6dce /website/features/NonNull.html
parent4b878f9ba996f852ce555c3024512ae34e34774e (diff)
downloadlombok-713822db9894cf99184aff57b3387f99846aa870.tar.gz
lombok-713822db9894cf99184aff57b3387f99846aa870.tar.bz2
lombok-713822db9894cf99184aff57b3387f99846aa870.zip
Changed the lombok.nonNull.exceptionType configkey to be an enum, partly to enforce only sensible exceptions and partly to make it possible to have the message be ‘x is null’ when throwing IAEs.
Diffstat (limited to 'website/features/NonNull.html')
-rw-r--r--website/features/NonNull.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/website/features/NonNull.html b/website/features/NonNull.html
index 4a98504a..29d8c188 100644
--- a/website/features/NonNull.html
+++ b/website/features/NonNull.html
@@ -42,8 +42,9 @@
<div class="overview confKeys">
<h3>Supported configuration keys:</h3>
<dl>
- <dt><code>lombok.nonNull.exceptionType</code> = [<code>fully qualified name of an exception</code>] (default: <code>java.lang.NullPointerException</code>).
- <dd>When lombok generates a null-check <code>if</code> statement, an exception is thrown, with the parameter / field name as message. By default, this will be a <code>java.lang.NullPointerException</code>, but you can for example put <code>java.lang.IllegalArgumentException</code> in this configuration key to have lombok throw a different exception.</dd>
+ <dt><code>lombok.nonNull.exceptionType</code> = [<code>NullPointerException</code> | <code>IllegalArgumentException</code>] (default: <code>NullPointerException</code>).
+ <dd>When lombok generates a null-check <code>if</code> statement, by default, a <code>java.lang.NullPointerException</code> will be thrown with the field name as the exception message.
+ However, you can use <code>IllegalArgumentException</code> in this configuration key to have lombok throw that exception, with '<em>fieldName</em> is null' as exception message.</dd>
<dt><code>lombok.nonNull.flagUsage</code> = [<code>warning</code> | <code>error</code>] (default: not set)</dt>
<dd>Lombok will flag any usage of <code>@NonNull</code> as a warning or error if configured.</dd>
</dl>