Suppress NPE warning

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1055902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2011-01-06 14:52:00 +00:00
parent ee61e5660f
commit 707c93a25f
1 changed files with 3 additions and 1 deletions

View File

@ -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.