Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lombok causing "Actual and formal arguments lists differ in length error"

I have the following class:

@Builder @NoArgsConstructor public class ConsultationPointOfContact {     private String fullName;     private String phoneNumber;     private String userLogin;    } 

When the @Builder annotation exists, it is causing problems with the @NoArgsConstructor.

I am getting the error:

Error:(11, 1) java: constructor ConsultationPointOfContact in class models.ConsultationPointOfContact cannot be applied to given types;   required: no arguments   found: java.lang.String,java.lang.String,java.lang.String   reason: actual and formal argument lists differ in length 
like image 733
Menelaos Avatar asked Mar 14 '18 16:03

Menelaos


1 Answers

Add @AllArgsConstructor as well and this should fix the issue

like image 155
Antoniossss Avatar answered Sep 19 '22 13:09

Antoniossss