Yes, @Data implies @EqualsAndHashCode and @ToString . See @Data documentation .
The generated hashCode() method will call the hashCode methods for all fields. Therefore, if one of the field values โโthrows an exception, then that is.
Another scenario is that you have references to round objects: if one object has a field containing an object that has a field related to the first object, calling the hashCode method will call StackOverflow.
Disclosure: I am one of the developers of Lombok.
source share