Inspectopedia
 
2024.3

Use of shallow or 'Objects' methods with arrays

Warning
New
Last modified: 03 December 2024

Reports expressions that seem to use an inappropriate method for determining array equality or calculating their hashcode.

The following method calls are reported:

  • Object.equals() for any arrays

  • Arrays.equals() for multidimensional arrays

  • Arrays.hashCode() for multidimensional arrays