diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/transform/resource/after-delombok/SuperBuilderWithNonNull.java | 6 | ||||
-rw-r--r-- | test/transform/resource/before/SuperBuilderWithNonNull.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java index 6fea9d17..5eba938f 100644 --- a/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java +++ b/test/transform/resource/after-delombok/SuperBuilderWithNonNull.java @@ -2,7 +2,7 @@ import java.util.List; public class SuperBuilderWithNonNull {
public static class Parent {
@lombok.NonNull
- String nonNullParentField;
+ final String nonNullParentField;
@java.lang.SuppressWarnings("all")
private static String $default$nonNullParentField() {
return "default";
@@ -47,8 +47,8 @@ public class SuperBuilderWithNonNull { }
@java.lang.SuppressWarnings("all")
protected Parent(final ParentBuilder<?, ?> b) {
- this.nonNullParentField = b.nonNullParentField;
- if (!b.nonNullParentField$set) this.nonNullParentField = Parent.$default$nonNullParentField();
+ if (b.nonNullParentField$set) this.nonNullParentField = b.nonNullParentField;
+ else this.nonNullParentField = Parent.$default$nonNullParentField();
if (nonNullParentField == null) {
throw new java.lang.NullPointerException("nonNullParentField is marked @NonNull but is null");
}
diff --git a/test/transform/resource/before/SuperBuilderWithNonNull.java b/test/transform/resource/before/SuperBuilderWithNonNull.java index 21f67a47..34668bbc 100644 --- a/test/transform/resource/before/SuperBuilderWithNonNull.java +++ b/test/transform/resource/before/SuperBuilderWithNonNull.java @@ -5,7 +5,7 @@ public class SuperBuilderWithNonNull { public static class Parent { @lombok.NonNull @lombok.Builder.Default - String nonNullParentField = "default"; + final String nonNullParentField = "default"; } @lombok.experimental.SuperBuilder |