commit | 21a9aa44133fd2986cd24097c66045186b9fb373 | [log] [tgz] |
---|---|---|
author | Alex Herbert <aherbert@apache.org> | Wed Aug 18 11:14:58 2021 +0100 |
committer | Alex Herbert <aherbert@apache.org> | Wed Aug 18 11:14:58 2021 +0100 |
tree | b77f7866f6da2cd6882dbad2f9ec855e3de0ddc2 | |
parent | 0a42dc86cbbc7872068180cf932a500f354cb725 [diff] |
Sonar fix: use equals to compare Integers
diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/genetics/RandomKey.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/genetics/RandomKey.java index 1b80280..003c476 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/genetics/RandomKey.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/genetics/RandomKey.java
@@ -163,7 +163,7 @@ List<Integer> anotherPerm = anotherRk.baseSeqPermutation; for (int i=0; i<getLength(); i++) { - if (thisPerm.get(i) != anotherPerm.get(i)) { + if (!thisPerm.get(i).equals(anotherPerm.get(i))) { return false; } }