commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1055902 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
Date Thu, 06 Jan 2011 14:52:00 GMT
Author: sebb
Date: Thu Jan  6 14:52:00 2011
New Revision: 1055902

URL: http://svn.apache.org/viewvc?rev=1055902&view=rev
Log:
Suppress NPE warning

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java?rev=1055902&r1=1055901&r2=1055902&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/SimplexOptimizer.java
Thu Jan  6 14:52:00 2011
@@ -144,7 +144,9 @@ public class SimplexOptimizer
             if (iteration > 0) {
                 boolean converged = true;
                 for (int i = 0; i < simplex.getSize(); i++) {
-                    converged &= checker.converged(iteration, previous[i], simplex.getPoint(i));
+                    @SuppressWarnings("null") // Cannot be null when iteration > 0
+                    RealPointValuePair prev = previous[i];
+                    converged &= checker.converged(iteration, prev, simplex.getPoint(i));
                 }
                 if (converged) {
                     // We have found an optimum.



Mime
View raw message