diff --git a/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java b/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java index 5d2518ab0..7ffea209c 100644 --- a/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java +++ b/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java @@ -845,15 +845,13 @@ public class MillerUpdatingRegression implements UpdatingMultipleLinearRegressio while (i < nvars) { l = vorder[i]; for (int j = 0; j < list.length; j++) { - if (l == list[j]) { - if (i > next) { - this.vmove(i, next); - ++next; - if (next >= list.length + pos1) { - return 0; - } else { - break; - } + if (l == list[j] && i > next) { + this.vmove(i, next); + ++next; + if (next >= list.length + pos1) { + return 0; + } else { + break; } } }