aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-10-29 23:41:11 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-10-29 23:41:11 +0100
commit03365378e91414a5a475cb234ca86ef2697ce9a9 (patch)
treea3d4386f9f4138339a9fb34ed6fa089fa9a16f7b /test/transform/resource/after-delombok/BuilderSingularWildcardListsWithToBuilder.java
parentd8de0e3c49c97450c3cd78a7d1766a8f21150591 (diff)
downloadlombok-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.java7
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;
+ }
}