mirror of
https://github.com/tiennm99/lombok.git
synced 2026-09-06 22:17:45 +00:00
[i660] canEqual is now protected instead of public.
Also fixed the total lack of canEqual in the usage examples.
This commit is contained in:
@@ -65,9 +65,8 @@
|
||||
return false. This is analogous to <code>java.lang.Double</code>'s equals method, and is in fact required to ensure that comparing an object
|
||||
to an exact copy of itself returns <code>true</code> for equality.
|
||||
</p><p>
|
||||
If there is <em>any</em> method named either <code>hashCode</code>, <code>equals</code> or <code>canEqual</code>, regardless of
|
||||
parameters or return type, no methods will be generated, and a warning is emitted instead. These 3 methods need to be in sync with
|
||||
each other, which lombok cannot guarantee unless it generates all the methods, hence you always get a warning if one <em>or</em> more
|
||||
If there is <em>any</em> method named either <code>hashCode</code> or <code>equals</code>, regardless of return type, no methods will be generated, and a warning is emitted instead. These 2 methods need to be in sync with
|
||||
each other, which lombok cannot guarantee unless it generates all the methods, hence you always get a warning if one <em>or</em> both
|
||||
of the methods already exist.
|
||||
</p><p>
|
||||
Attempting to exclude fields that don't exist or would have been excluded anyway (because they are static or transient) results in warnings on the named fields.
|
||||
|
||||
Reference in New Issue
Block a user