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:
parent
ee61e5660f
commit
707c93a25f
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue