diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-31 06:33:33 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-01-31 06:33:33 +0100 |
commit | c42bfbae39990b365a5f05eb23895da6203023bc (patch) | |
tree | 6bbebbff773571debc5709072e735f2f42469d46 /src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | |
parent | d31182c4383a5ccc499862d2a8035d49e5202319 (diff) | |
download | lombok-c42bfbae39990b365a5f05eb23895da6203023bc.tar.gz lombok-c42bfbae39990b365a5f05eb23895da6203023bc.tar.bz2 lombok-c42bfbae39990b365a5f05eb23895da6203023bc.zip |
[issue #2221] simplified configuration for `@Singular`-generated plural form nullchecks.
Diffstat (limited to 'src/core/lombok/eclipse/handlers/HandleSuperBuilder.java')
-rwxr-xr-x | src/core/lombok/eclipse/handlers/HandleSuperBuilder.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java index 4b450a07..0a5acd56 100755 --- a/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java +++ b/src/core/lombok/eclipse/handlers/HandleSuperBuilder.java @@ -79,7 +79,6 @@ import org.mangosdk.spi.ProviderFor; import lombok.AccessLevel; import lombok.Builder; import lombok.Builder.ObtainVia; -import lombok.Singular.NullCollectionBehavior; import lombok.ConfigurationKeys; import lombok.Singular; import lombok.ToString; @@ -567,7 +566,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { } if (hasNonNullAnnotations(fieldNode.originalFieldNode)) { - Statement nullCheck = generateNullCheck((FieldDeclaration) fieldNode.originalFieldNode.get(), sourceNode); + Statement nullCheck = generateNullCheck((FieldDeclaration) fieldNode.originalFieldNode.get(), sourceNode, null); if (nullCheck != null) statements.add(nullCheck); } } @@ -1044,8 +1043,7 @@ public class HandleSuperBuilder extends EclipseAnnotationHandler<SuperBuilder> { return null; } - NullCollectionBehavior behavior = HandleBuilder.getNullBehaviorFor(ann, singularInstance, node); - return new SingularData(child, singularName, pluralName, typeArgs == null ? Collections.<TypeReference>emptyList() : Arrays.asList(typeArgs), targetFqn, singularizer, source, behavior); + return new SingularData(child, singularName, pluralName, typeArgs == null ? Collections.<TypeReference>emptyList() : Arrays.asList(typeArgs), targetFqn, singularizer, source, singularInstance.ignoreNullCollections()); } return null; |