diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-29 23:41:11 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-10-29 23:41:11 +0100 |
commit | 03365378e91414a5a475cb234ca86ef2697ce9a9 (patch) | |
tree | a3d4386f9f4138339a9fb34ed6fa089fa9a16f7b /test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java | |
parent | d8de0e3c49c97450c3cd78a7d1766a8f21150591 (diff) | |
download | lombok-03365378e91414a5a475cb234ca86ef2697ce9a9.tar.gz lombok-03365378e91414a5a475cb234ca86ef2697ce9a9.tar.bz2 lombok-03365378e91414a5a475cb234ca86ef2697ce9a9.zip |
fixing the tests added in the previous commits by janrieke to match alternative take on how to ‘fix’ null-collections and singular/toBuilder.
Diffstat (limited to 'test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java')
-rw-r--r-- | test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java | 7 |
1 files changed, 5 insertions, 2 deletions
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.<java.lang.Object>emptyList() : this.objects).numbers(this.numbers == null ? java.util.Collections.<Number>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; + } } |