From 03365378e91414a5a475cb234ca86ef2697ce9a9 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 29 Oct 2018 23:41:11 +0100 Subject: fixing the tests added in the previous commits by janrieke to match alternative take on how to ‘fix’ null-collections and singular/toBuilder. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../after-delombok/BuilderSingularWildcardListsWithToBuilder.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java') diff --git a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java index 509d0394..f0acf4f2 100644 --- a/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java +++ b/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java @@ -89,6 +89,9 @@ class BuilderSingularWildcardListsWithToBuilder { } @java.lang.SuppressWarnings("all") public BuilderSingularWildcardListsWithToBuilderBuilder toBuilder() { - return new BuilderSingularWildcardListsWithToBuilderBuilder().objects(this.objects == null ? java.util.Collections.emptyList() : this.objects).numbers(this.numbers == null ? java.util.Collections.emptyList() : this.numbers); - } + final BuilderSingularWildcardListsWithToBuilderBuilder builder = new BuilderSingularWildcardListsWithToBuilderBuilder(); + if (this.objects != null) builder.objects(this.objects); + if (this.numbers != null) builder.numbers(this.numbers); + return builder; + } } -- cgit