Fixed findbugs finding when comparing Integer references.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1369540 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-08-05 09:32:46 +00:00
parent 4104b21368
commit d880dddc55

View File

@ -142,8 +142,9 @@ public class SimplexSolver extends AbstractLinearOptimizer {
int minIndex = tableau.getWidth();
for (Integer row : minRatioPositions) {
int i = tableau.getNumObjectiveFunctions();
for (; i < tableau.getWidth() - 1 && minRow != row; i++) {
if (row == tableau.getBasicRow(i)) {
for (; i < tableau.getWidth() - 1 && !row.equals(minRow); i++) {
Integer basicRow = tableau.getBasicRow(i);
if (basicRow != null && basicRow.equals(row)) {
if (i < minIndex) {
minIndex = i;
minRow = row;