aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/BuilderWithToBuilder.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2018-10-15 21:12:45 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-10-15 21:16:03 +0200
commit94eadb5131b32b6cf599a3f5445524a08ba0569b (patch)
tree391e310ec42d25e9ee26bbff57290d492da23f51 /test/transform/resource/before/BuilderWithToBuilder.java
parent06455de367932e93da707b9d91e1a347d0c072a6 (diff)
downloadlombok-94eadb5131b32b6cf599a3f5445524a08ba0569b.tar.gz
lombok-94eadb5131b32b6cf599a3f5445524a08ba0569b.tar.bz2
lombok-94eadb5131b32b6cf599a3f5445524a08ba0569b.zip
[fixes #1324] toBuilder with @Singular marked collections that are null no longer throws NPE.
Diffstat (limited to 'test/transform/resource/before/BuilderWithToBuilder.java')
-rw-r--r--test/transform/resource/before/BuilderWithToBuilder.java15
1 files changed, 2 insertions, 13 deletions
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<T> {
class ConstructorWithToBuilder<T> {
private String mOne, mTwo;
private T foo;
- @lombok.Singular private List<T> bars;
- @Builder(toBuilder = true)
- public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T bar) {
- }
-}
-@lombok.experimental.Accessors(prefix = "m")
-class StaticWithToBuilder<T, K> {
- private String mOne, mTwo;
- private T foo;
- private K bar;
- @lombok.Singular private List<T> bars;
+ @lombok.Singular private com.google.common.collect.ImmutableList<T> bars;
@Builder(toBuilder = true)
- public static <Z> StaticWithToBuilder<Z, String> test(String mOne, @Builder.ObtainVia(field = "foo") Z bar) {
- return new StaticWithToBuilder<Z, String>();
+ public ConstructorWithToBuilder(String mOne, @Builder.ObtainVia(field = "foo") T baz, com.google.common.collect.ImmutableList<T> bars) {
}
}