Why is Lombok @Builder not compatible with this constructor?
Why is Lombok @Builder not compatible with this constructor? I have this simple code: @Data @Builder public class RegistrationInfo { private String mail; private String password; public RegistrationInfo(RegistrationInfo registrationInfo) { this.mail = registrationInfo.mail; this.password = registrationInfo.password; } } First I was using only the @Builder Lombok annotation and everything was fine. But I added the constructor and the code does not compile any more. The error is: @Builder Error:(2, 1) java: constructor RegistrationInfo in class com.user.RegistrationInfo cannot be applied to given types; required: com.user.RegistrationInfo found: java.lang.String,java.lang.String reason: actual and formal argument lists differ in length So I have two questions: @Builder From the error, i assume that 1) incorrect number of parameters in the constructor 2) incorrect parameters type is passed to the constructor ...