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
Adding Lombok Builder, as explained in this comment is working fine. However, there's a problem with default values. When utilizing Lombok Builder, the default values specified in the model classes aren't retained; instead, they're being set to null.
This problem can be resolved by leveraging Lombok's @Builder.Default annotation, which allows us to specify default values for fields within the builder pattern. More details about this annotation can be found here.
Bug Report Checklist
Description
Adding Lombok Builder, as explained in this comment is working fine. However, there's a problem with default values. When utilizing Lombok Builder, the default values specified in the model classes aren't retained; instead, they're being set to null.
This problem can be resolved by leveraging Lombok's @Builder.Default annotation, which allows us to specify default values for fields within the builder pattern. More details about this annotation can be found here.
Related issues/PRs
Input
Current output
Expected output
@lombok.Builder public class MyObject { ... + @lombok.Builder.Default private Integer propertyWithDefaultValue = 20; private Integer simpleProperty; ... }
The text was updated successfully, but these errors were encountered: