mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-20 00:15:29 +00:00
[Fixes #2115] builder fields tracking a property that has a default set is now called $value in order to convey that you shouldnt manually mess with it.
This commit is contained in:
1 parent
b3824c9dc1
commit
b439e4ce77
23 files changed
+208
-176
No files matched your search
@@ -10,7 +10,7 @@ final class ConstructorsWithBuilderDefaults {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private boolean x$set;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int x;
|
||||
private int x$value;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int y;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
@@ -18,7 +18,7 @@ final class ConstructorsWithBuilderDefaults {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public ConstructorsWithBuilderDefaultsBuilder x(final int x) {
|
||||
this.x = x;
|
||||
this.x$value = x;
|
||||
x$set = true;
|
||||
return this;
|
||||
}
|
||||
@@ -29,14 +29,14 @@ final class ConstructorsWithBuilderDefaults {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public ConstructorsWithBuilderDefaults build() {
|
||||
int x = this.x;
|
||||
if (!x$set) x = ConstructorsWithBuilderDefaults.$default$x();
|
||||
return new ConstructorsWithBuilderDefaults(x, y);
|
||||
int x$value = this.x$value;
|
||||
if (!x$set) x$value = ConstructorsWithBuilderDefaults.$default$x();
|
||||
return new ConstructorsWithBuilderDefaults(x$value, y);
|
||||
}
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(x=" + this.x + ", y=" + this.y + ")";
|
||||
return "ConstructorsWithBuilderDefaults.ConstructorsWithBuilderDefaultsBuilder(x$value=" + this.x$value + ", y=" + this.y + ")";
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
|
||||
Reference in new issue
Block a user