Inspectopedia
 
2024.3

'equals()' called on array

Warning
New
Last modified: 03 December 2024

Reports equals() calls that compare two arrays.

Calling equals() on an array compares identity and is equivalent to using ==. Use Arrays.equals() to compare the contents of two arrays, or Arrays.deepEquals() for multi-dimensional arrays.

Example:

After the quick-fix is applied: