You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2015/08/29 00:27:48 UTC

[3/3] [math] Constant can be "static" (FindBugs)

Constant can be "static" (FindBugs)


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/7b9df59a
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/7b9df59a
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/7b9df59a

Branch: refs/heads/master
Commit: 7b9df59a96adfce979c8c564dc5eaa6a29b7f25f
Parents: 10dc13c
Author: Gilles <er...@apache.org>
Authored: Sat Aug 29 00:26:43 2015 +0200
Committer: Gilles <er...@apache.org>
Committed: Sat Aug 29 00:26:43 2015 +0200

----------------------------------------------------------------------
 .../org/apache/commons/math4/linear/EigenDecomposition.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/7b9df59a/src/main/java/org/apache/commons/math4/linear/EigenDecomposition.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/linear/EigenDecomposition.java b/src/main/java/org/apache/commons/math4/linear/EigenDecomposition.java
index 9633670..aa92b5e 100644
--- a/src/main/java/org/apache/commons/math4/linear/EigenDecomposition.java
+++ b/src/main/java/org/apache/commons/math4/linear/EigenDecomposition.java
@@ -80,7 +80,7 @@ public class EigenDecomposition {
     /** Internally used epsilon criteria. */
     private static final double EPSILON = 1e-12;
     /** Maximum number of iterations accepted in the implicit QL transformation */
-    private final byte maxIter = 30;
+    private static final byte MAX_ITER = 30;
     /** Main diagonal of the tridiagonal matrix. */
     private double[] main;
     /** Secondary diagonal of the tridiagonal matrix. */
@@ -608,9 +608,9 @@ public class EigenDecomposition {
                     }
                 }
                 if (m != j) {
-                    if (its == maxIter) {
+                    if (its == MAX_ITER) {
                         throw new MaxCountExceededException(LocalizedFormats.CONVERGENCE_FAILED,
-                                                            maxIter);
+                                                            MAX_ITER);
                     }
                     its++;
                     double q = (realEigenvalues[j + 1] - realEigenvalues[j]) / (2 * e[j]);