You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the version 1.1.5, the copy builder has started using getX() methods instead of just the field. So if there is a field without a getter function, like most public final fields would not have, the copy builder generated does not work properly.
Say we have the following class
public class Foo {
public final String bar;
}
This would generate builder like
public static final class Builder {
private String bar;
public Builder() {
}
public Builder(final Foo copy) {
this.bar = copy.getBar();
}
public Builder withBar(final String bar) {
this.bar = bar;
return this;
}
public Foo build() {
return new Foo(this);
}
}
this.bar = copy.getBar();
This part is not valid code as the class does not have getBar function
The text was updated successfully, but these errors were encountered:
In the version 1.1.5, the copy builder has started using getX() methods instead of just the field. So if there is a field without a getter function, like most public final fields would not have, the copy builder generated does not work properly.
Say we have the following class
This would generate builder like
this.bar = copy.getBar();
This part is not valid code as the class does not have getBar function
The text was updated successfully, but these errors were encountered: