I have this DTO which uses @Data
annotation of lombok
in order to generate getters
and setters
:
@Data
public class SomeDto {
protected boolean isGood;
}
The weird thing is that now my getter has been renamed from getisGood()
to isGood()
and the setter has the name setGood()
instead of setIsGood()
.
Example:
SomeDto somedto = new SomeDto()
somedto.setGood(false) //sets the value to false - should have been setIsGood
somedto.isGood() //return false - should have been getIsGood
Also when I make a request on the endpoint where I use this DTO in the JSON returns:
{"good": false}
whereas is should has been :
{"isGood": false}
Anyone has any idea what the problem is? I have a suspicion that the "is" in the beginning of isGood
creates maybe a confusion for lombok. I appreciate any help you can provide.