Removed inconsistent null checks (reported by FindBugs).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1421290 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
77910da210
commit
96f6fd10b6
|
@ -18,7 +18,6 @@ package org.apache.commons.math3.optim;
|
|||
|
||||
import org.apache.commons.math3.exception.MathIllegalStateException;
|
||||
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
|
||||
import org.apache.commons.math3.exception.NullArgumentException;
|
||||
import org.apache.commons.math3.random.RandomVectorGenerator;
|
||||
|
||||
/**
|
||||
|
@ -66,8 +65,6 @@ public abstract class BaseMultiStartMultivariateOptimizer<PAIR>
|
|||
* the {@link #optimize(OptimizationData[]) optimize} will return the
|
||||
* same solution as the given {@code optimizer} would return.
|
||||
* @param generator Random vector generator to use for restarts.
|
||||
* @throws NullArgumentException if {@code optimizer} or {@code generator}
|
||||
* is {@code null}.
|
||||
* @throws NotStrictlyPositiveException if {@code starts < 1}.
|
||||
*/
|
||||
public BaseMultiStartMultivariateOptimizer(final BaseMultivariateOptimizer<PAIR> optimizer,
|
||||
|
@ -75,10 +72,6 @@ public abstract class BaseMultiStartMultivariateOptimizer<PAIR>
|
|||
final RandomVectorGenerator generator) {
|
||||
super(optimizer.getConvergenceChecker());
|
||||
|
||||
if (optimizer == null ||
|
||||
generator == null) {
|
||||
throw new NullArgumentException();
|
||||
}
|
||||
if (starts < 1) {
|
||||
throw new NotStrictlyPositiveException(starts);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.util.Arrays;
|
|||
import java.util.Comparator;
|
||||
import org.apache.commons.math3.exception.MathIllegalStateException;
|
||||
import org.apache.commons.math3.exception.NotStrictlyPositiveException;
|
||||
import org.apache.commons.math3.exception.NullArgumentException;
|
||||
import org.apache.commons.math3.exception.util.LocalizedFormats;
|
||||
import org.apache.commons.math3.random.RandomGenerator;
|
||||
import org.apache.commons.math3.optim.MaxEval;
|
||||
|
@ -72,8 +71,6 @@ public class MultiStartUnivariateOptimizer
|
|||
* the {@code optimize} methods will return the same solution as
|
||||
* {@code optimizer} would.
|
||||
* @param generator Random generator to use for restarts.
|
||||
* @throws NullArgumentException if {@code optimizer} or {@code generator}
|
||||
* is {@code null}.
|
||||
* @throws NotStrictlyPositiveException if {@code starts < 1}.
|
||||
*/
|
||||
public MultiStartUnivariateOptimizer(final UnivariateOptimizer optimizer,
|
||||
|
@ -81,10 +78,6 @@ public class MultiStartUnivariateOptimizer
|
|||
final RandomGenerator generator) {
|
||||
super(optimizer.getConvergenceChecker());
|
||||
|
||||
if (optimizer == null ||
|
||||
generator == null) {
|
||||
throw new NullArgumentException();
|
||||
}
|
||||
if (starts < 1) {
|
||||
throw new NotStrictlyPositiveException(starts);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue