You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2012/07/22 19:23:13 UTC

svn commit: r1364371 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java

Author: tn
Date: Sun Jul 22 17:23:12 2012
New Revision: 1364371

URL: http://svn.apache.org/viewvc?rev=1364371&view=rev
Log:
Combined two subsequent if statements, reported by pmd.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java?rev=1364371&r1=1364370&r2=1364371&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/regression/MillerUpdatingRegression.java Sun Jul 22 17:23:12 2012
@@ -845,15 +845,13 @@ public class MillerUpdatingRegression im
         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;
                     }
                 }
             }