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
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class DTOParent {
private String a;
}
and a child, using @SuperBuilder and @Builder.Default
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class DTO extends DTOParent {
@Builder.Default
private Integer number = 5;
}
The problem is that lombok and delombok generate different result.
Lombok on the left and delombok+compile on the right
Expected behavior
Lombok initializes the field annotated with @Builder.Default in no-args constructor, as I believe is expected
Delomboked code is missing that step
Version info (please complete the following information):