Inspectopedia
 
2024.3

Non-final field referenced in 'equals()'

Warning
New
Last modified: 03 December 2024

Reports implementations of equals() that access non-final variables. Such access may result in equals() returning different results at different points in the object's lifecycle, which may in turn cause problems when using the standard collections classes.

Example: