diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-11 01:41:22 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-11 01:59:19 +0200 |
commit | d7873f2d21564e8e7f22409fe03681d7dd4c8c1e (patch) | |
tree | 582ac7cf6ef36c69e93503a04b8391950df25f24 /src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | |
parent | cc8370ab2d7b3ca15023364c99e53735e62e13d7 (diff) | |
download | lombok-d7873f2d21564e8e7f22409fe03681d7dd4c8c1e.tar.gz lombok-d7873f2d21564e8e7f22409fe03681d7dd4c8c1e.tar.bz2 lombok-d7873f2d21564e8e7f22409fe03681d7dd4c8c1e.zip |
Replaced the notion of ‘nullable’ and ‘nonnull’ get copied to ‘any ‘copyable’ annotations get copied’, with ‘copyable’ defined as a specific FQN-style list of well-known nullity-indicating annotations, plus whatever you configured in lombok.config.
Also some work on the notion of TYPE_USE annotations.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSuperBuilder.java')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index 3c07ac55..559cca20 100644 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -493,12 +493,9 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { statements.add(assignment); } - Annotation[] nonNulls = findAnnotations((FieldDeclaration)fieldNode.originalFieldNode.get(), NON_NULL_PATTERN); - if (nonNulls.length != 0) { - Statement nullCheck = generateNullCheck((FieldDeclaration)fieldNode.originalFieldNode.get(), sourceNode); - if (nullCheck != null) { - statements.add(nullCheck); - } + if (hasNonNullAnnotations(fieldNode.originalFieldNode)) { + Statement nullCheck = generateNullCheck((FieldDeclaration) fieldNode.originalFieldNode.get(), sourceNode); + if (nullCheck != null) statements.add(nullCheck); } } |