From 713822db9894cf99184aff57b3387f99846aa870 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 27 May 2014 20:29:54 +0200 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/features/NonNull.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'website/features') 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 @@

Supported configuration keys:

-
lombok.nonNull.exceptionType = [fully qualified name of an exception] (default: java.lang.NullPointerException). -
When lombok generates a null-check if statement, an exception is thrown, with the parameter / field name as message. By default, this will be a java.lang.NullPointerException, but you can for example put java.lang.IllegalArgumentException in this configuration key to have lombok throw a different exception.
+
lombok.nonNull.exceptionType = [NullPointerException | IllegalArgumentException] (default: NullPointerException). +
When lombok generates a null-check if statement, by default, a java.lang.NullPointerException will be thrown with the field name as the exception message. + However, you can use IllegalArgumentException in this configuration key to have lombok throw that exception, with 'fieldName is null' as exception message.
lombok.nonNull.flagUsage = [warning | error] (default: not set)
Lombok will flag any usage of @NonNull as a warning or error if configured.
-- cgit