aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
authorJan Rieke <rieke@subshell.com>2018-08-16 15:27:54 +0200
committerJan Rieke <rieke@subshell.com>2018-08-16 15:27:54 +0200
commit8439cb5428a7dedbfa836b7028db7c7dba61293a (patch)
treeaf1e32316a6e79acbd50e19ffa210320f274a720 /test/transform/resource
parentdbc173ba5c575eea404d3a76b3bc24d35656767c (diff)
downloadlombok-8439cb5428a7dedbfa836b7028db7c7dba61293a.tar.gz
lombok-8439cb5428a7dedbfa836b7028db7c7dba61293a.tar.bz2
lombok-8439cb5428a7dedbfa836b7028db7c7dba61293a.zip
@SuperBuilder adapts @Builder.Default behavior from @Builder as #1347 is
fixed now (ecj)
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-ecj/SuperBuilderWithDefaults.java30
1 files changed, 21 insertions, 9 deletions
diff --git a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java
index f0e3d8be..731bd9f2 100644
--- a/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java
+++ b/test/transform/resource/after-ecj/SuperBuilderWithDefaults.java
@@ -36,14 +36,22 @@ public class SuperBuilderWithDefaults {
return new Parent<N>(this);
}
}
- private @lombok.Builder.Default long millis = System.currentTimeMillis();
- private @lombok.Builder.Default N numberField = null;
+ private @lombok.Builder.Default long millis;
+ private @lombok.Builder.Default N numberField;
+ private static @java.lang.SuppressWarnings("all") <N extends Number>long $default$millis() {
+ return System.currentTimeMillis();
+ }
+ private static @java.lang.SuppressWarnings("all") <N extends Number>N $default$numberField() {
+ return null;
+ }
protected @java.lang.SuppressWarnings("all") Parent(final ParentBuilder<N, ?, ?> b) {
super();
- if (b.millis$set)
- this.millis = b.millis;
- if (b.numberField$set)
- this.numberField = b.numberField;
+ this.millis = b.millis;
+ if ((! b.millis$set))
+ this.millis = Parent.<N>$default$millis();
+ this.numberField = b.numberField;
+ if ((! b.numberField$set))
+ this.numberField = Parent.<N>$default$numberField();
}
public static @java.lang.SuppressWarnings("all") <N extends Number>ParentBuilder<N, ?, ?> builder() {
return new ParentBuilderImpl<N>();
@@ -78,11 +86,15 @@ public class SuperBuilderWithDefaults {
return new Child(this);
}
}
- private @lombok.Builder.Default double doubleField = Math.PI;
+ private @lombok.Builder.Default double doubleField;
+ private static @java.lang.SuppressWarnings("all") double $default$doubleField() {
+ return Math.PI;
+ }
protected @java.lang.SuppressWarnings("all") Child(final ChildBuilder<?, ?> b) {
super(b);
- if (b.doubleField$set)
- this.doubleField = b.doubleField;
+ this.doubleField = b.doubleField;
+ if ((! b.doubleField$set))
+ this.doubleField = Child.$default$doubleField();
}
public static @java.lang.SuppressWarnings("all") ChildBuilder<?, ?> builder() {
return new ChildBuilderImpl();