From 94eadb5131b32b6cf599a3f5445524a08ba0569b Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 15 Oct 2018 21:12:45 +0200 Subject: [fixes #1324] toBuilder with @Singular marked collections that are null no longer throws NPE. --- test/transform/resource/before/BuilderWithToBuilder.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'test/transform/resource/before/BuilderWithToBuilder.java') diff --git a/test/transform/resource/before/BuilderWithToBuilder.java b/test/transform/resource/before/BuilderWithToBuilder.java index 63e16ae8..50938ab2 100644 --- a/test/transform/resource/before/BuilderWithToBuilder.java +++ b/test/transform/resource/before/BuilderWithToBuilder.java @@ -13,19 +13,8 @@ class BuilderWithToBuilder { class ConstructorWithToBuilder { private String mOne, mTwo; private T foo; - @lombok.Singular private List bars; - @Builder(toBuilder = true) - public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T bar) { - } -} -@lombok.experimental.Accessors(prefix = "m") -class StaticWithToBuilder { - private String mOne, mTwo; - private T foo; - private K bar; - @lombok.Singular private List bars; + @lombok.Singular private com.google.common.collect.ImmutableList bars; @Builder(toBuilder = true) - public static StaticWithToBuilder test(String mOne, @Builder.ObtainVia(field = "foo") Z bar) { - return new StaticWithToBuilder(); + public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList bars) { } } -- cgit