-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] @lombok.Builder.Default does not work on records #3547
Comments
Per Lombok author @rzwitserloot's comment on a relevant Stack Overflow question about whether this is possible:
Also:
An answer to that question calls out a different approach if default values are needed, which is to customize the builder class to set the default value, instead of using @lombok.Builder
record Foo(String bar) {
public static class FooBuilder {
private String bar = "ok";
}
} |
Incidentally, as long as |
Applying
@Default
to arecord
class fails to compile.The expected behaviour is that works as in a normal class
The text was updated successfully, but these errors were encountered: