mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 06:15:41 +00:00
do null checks after assignment so that default==null is covered
This commit is contained in:
1 parent
8439cb5428
commit
46837d6d8b
3 files changed
+144
-8
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import java.util.List;
|
||||
|
||||
public class SuperBuilderWithNonNull {
|
||||
@lombok.experimental.SuperBuilder
|
||||
public static class Parent {
|
||||
@lombok.NonNull
|
||||
@lombok.Builder.Default
|
||||
String nonNullParentField = "default";
|
||||
}
|
||||
|
||||
@lombok.experimental.SuperBuilder
|
||||
public static class Child extends Parent {
|
||||
@lombok.NonNull
|
||||
String nonNullChildField;
|
||||
}
|
||||
|
||||
public static void test() {
|
||||
Child x = Child.builder().nonNullChildField("child").nonNullParentField("parent").build();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user