diff options
author | Jan Rieke <rieke@subshell.com> | 2018-08-16 17:58:05 +0200 |
---|---|---|
committer | Jan Rieke <rieke@subshell.com> | 2018-08-16 17:58:05 +0200 |
commit | 31aef5219d6e6a39afe5dfa5d888bddd6e942e25 (patch) | |
tree | 911c13bbaf052ae0ac08c0c386f27fe69d180b3e /test/transform/resource/after-delombok/SuperBuilderWithNonNull.java | |
parent | 46837d6d8be26cea9d0b8cf2959866ac308cbf2d (diff) | |
download | lombok-31aef5219d6e6a39afe5dfa5d888bddd6e942e25.tar.gz lombok-31aef5219d6e6a39afe5dfa5d888bddd6e942e25.tar.bz2 lombok-31aef5219d6e6a39afe5dfa5d888bddd6e942e25.zip |
only assign value once so that final fields work (javac)
Diffstat (limited to 'test/transform/resource/after-delombok/SuperBuilderWithNonNull.java')
-rw-r--r-- | test/transform/resource/after-delombok/SuperBuilderWithNonNull.java | 6 |
1 files changed, 3 insertions, 3 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");
}
|