This is an automated email from the ASF dual-hosted git repository. aherbert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-math.git
commit 21a9aa44133fd2986cd24097c66045186b9fb373 Author: Alex Herbert <aherb...@apache.org> AuthorDate: Wed Aug 18 11:14:58 2021 +0100 Sonar fix: use equals to compare Integers --- .../main/java/org/apache/commons/math4/legacy/genetics/RandomKey.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ public abstract class RandomKey<T> extends AbstractListChromosome<Double> implem 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; } }