- Lombok warning in inheritance classes.
Lombok warning happens in the condition that I have a subClass and a class in codes while running the application. !Warning:(18, 1) java: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
Solutions: Add @EqualsAndHashCode annotation for the subClass
- Maybe the best way to define constants var in java.
What is the best way to implement constants in Java?
Avoiding this pattern even has its own item (#18) in Bloch's Effective Java if define constants var in interface. An argument Bloch makes against the constant interface pattern is that use of constants is an implementation detail, but implementing an interface to use them exposes that implementation detail in your exported API.
Solution: Define constants var in Enum in java