Since: 6.30.0
Rule: CompareObjectsWithEquals
Codebase passes with previous PMD version, just upgraded to 6.30.0 and are now seeing assumed false positives with CompareObjectsWithEquals.
Code is as follows:
public static byte[] myArrayFunc(byte[] a1, byte[] a2) {
if (a1.length != a2.length) {
throw new IllegalArgumentException();
}
....
}
PMD now fails on the if (a1.length != a2.length) line; they are both primitive ints, and therefore do not have an equals method.
Possibly introduced by #2934
Since: 6.30.0
Rule: CompareObjectsWithEquals
Codebase passes with previous PMD version, just upgraded to 6.30.0 and are now seeing assumed false positives with CompareObjectsWithEquals.
Code is as follows:
PMD now fails on the
if (a1.length != a2.length)line; they are both primitive ints, and therefore do not have an equals method.Possibly introduced by #2934