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-ecj/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-ecj/BuilderSingularWildcardListsWithToBuilder.java')
-rw-r--r-- | test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java index e8db5ffd..e336c3fc 100644 --- a/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java +++ b/test/transform/resource/after-ecj/BuilderSingularWildcardListsWithToBuilder.java @@ -82,6 +82,11 @@ import lombok.Singular; return new BuilderSingularWildcardListsWithToBuilderBuilder(); } public @java.lang.SuppressWarnings("all") 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; } }
\ No newline at end of file |