From e94a5f9ee3e003c6b889168796bc010072177d14 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 5 Oct 2015 21:58:00 +0200 Subject: [Fixes #807] The NonNull annotation can now be used documentary style on params of abstract methods. The warning has been eliminated. --- website/features/NonNull.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'website') diff --git a/website/features/NonNull.html b/website/features/NonNull.html index d62441f4..50acf627 100644 --- a/website/features/NonNull.html +++ b/website/features/NonNull.html @@ -15,7 +15,7 @@

Overview

- NEW in Lombok 0.11.10: You can use @NonNull on the parameter of a method or constructor to have lombok generate a null-check statement for you. + NEW in Lombok 0.11.10: You can use @NonNull on the parameter of a method or constructor to have lombok generate a null-check statement for you.

Lombok has always treated any annotation named @NonNull on a field as a signal to generate a null-check if lombok generates an entire method or constructor for you, via for example @Data. Now, however, using lombok's own @lombok.NonNull on a parameter results in the insertion of just the null-check @@ -60,6 +60,9 @@ this feature only triggers on lombok's own @NonNull annotation from the lombok package.

A @NonNull on a primitive parameter results in a warning. No null-check will be generated. +

+ A @NonNull on a parameter of an abstract method used to generate a warning; starting with version 1.16.8, this is no longer the case, to acknowledge the notion that @NonNull also has a + documentary role. For the same reason, you can annotate a method as @NonNull; this is allowed, generates no warning, and does not generate any code.

-- cgit