All Downloads are FREE. Search and download functionalities are using the official Maven repository.

resources.report.rules.findbugs.EC_BAD_ARRAY_COMPARE.html Maven / Gradle / Ivy



EC_BAD_ARRAY_COMPARE

EC: Invocation of equals() on an array, which is equivalent to == (EC_BAD_ARRAY_COMPARE)

This method invokes the .equals(Object o) method on an array. Since arrays do not override the equals method of Object, calling equals on an array is the same as comparing their addresses. To compare the contents of the arrays, use java.util.Arrays.equals(Object[], Object[]). To compare the addresses of the arrays, it would be less confusing to explicitly check pointer equality using ==.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy