mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 08:18:29 +00:00
[fixes #2104] superbuilder + non-list-singulars wouldn’t work due to hardcoded call to emptyList.
This commit is contained in:
1 parent
bf0499263b
commit
2335f25166
16 files changed
+167
-57
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class SuperBuilderWithGenericsAndToBuilder {
|
||||
@lombok.experimental.SuperBuilder(toBuilder = true)
|
||||
public static class Parent<A> {
|
||||
A field1;
|
||||
@lombok.Singular List<String> items;
|
||||
@lombok.Singular Map<Integer, String> items;
|
||||
}
|
||||
|
||||
@lombok.experimental.SuperBuilder(toBuilder = true)
|
||||
@@ -13,6 +13,6 @@ public class SuperBuilderWithGenericsAndToBuilder {
|
||||
}
|
||||
|
||||
public static void test() {
|
||||
Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item("").build().toBuilder().build();
|
||||
Child<Integer> x = Child.<Integer>builder().field3(0.0).field1(5).item(5, "").build().toBuilder().build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user