This is an automated email from the ASF dual-hosted git repository.

erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-math.git

commit 6e11126615725795ac7bc1d39cfd8770e569dc46
Author: Gilles Sadowski <gillese...@gmail.com>
AuthorDate: Wed Sep 1 11:25:20 2021 +0200

    Spurious "throws" clauses.
---
 .../apache/commons/math4/legacy/optim/BaseOptimizer.java   | 14 ++++----------
 .../optim/nonlinear/scalar/MultivariateOptimizer.java      | 12 +++++-------
 2 files changed, 9 insertions(+), 17 deletions(-)

diff --git 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/BaseOptimizer.java
 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/BaseOptimizer.java
index 70e816a..4ebd6fb 100644
--- 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/BaseOptimizer.java
+++ 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/BaseOptimizer.java
@@ -148,9 +148,7 @@ public abstract class BaseOptimizer<PAIR> {
      * @throws TooManyIterationsException if the maximal number of
      * iterations is exceeded.
      */
-    public PAIR optimize(OptimizationData... optData)
-        throws TooManyEvaluationsException,
-               TooManyIterationsException {
+    public PAIR optimize(OptimizationData... optData) {
         // Parse options.
         parseOptimizationData(optData);
         // Reset counters.
@@ -168,9 +166,7 @@ public abstract class BaseOptimizer<PAIR> {
      * @throws TooManyIterationsException if the maximal number of
      * iterations is exceeded.
      */
-    public PAIR optimize()
-        throws TooManyEvaluationsException,
-               TooManyIterationsException {
+    public PAIR optimize() {
         // Reset counters.
         resetCounters();
         // Perform optimization.
@@ -191,8 +187,7 @@ public abstract class BaseOptimizer<PAIR> {
      * @throws TooManyEvaluationsException if the allowed evaluations
      * have been exhausted.
      */
-    protected void incrementEvaluationCount()
-        throws TooManyEvaluationsException {
+    protected void incrementEvaluationCount() {
         evaluations.increment();
     }
 
@@ -202,8 +197,7 @@ public abstract class BaseOptimizer<PAIR> {
      * @throws TooManyIterationsException if the allowed iterations
      * have been exhausted.
      */
-    protected void incrementIterationCount()
-        throws TooManyIterationsException {
+    protected void incrementIterationCount() {
         iterations.increment();
     }
 
diff --git 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/MultivariateOptimizer.java
 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/MultivariateOptimizer.java
index 174d8cf..c36e95e 100644
--- 
a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/MultivariateOptimizer.java
+++ 
b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/MultivariateOptimizer.java
@@ -17,7 +17,6 @@
 package org.apache.commons.math4.legacy.optim.nonlinear.scalar;
 
 import org.apache.commons.math4.legacy.analysis.MultivariateFunction;
-import org.apache.commons.math4.legacy.exception.TooManyEvaluationsException;
 import org.apache.commons.math4.legacy.optim.BaseMultivariateOptimizer;
 import org.apache.commons.math4.legacy.optim.ConvergenceChecker;
 import org.apache.commons.math4.legacy.optim.OptimizationData;
@@ -53,12 +52,11 @@ public abstract class MultivariateOptimizer
      *  <li>{@link GoalType}</li>
      * </ul>
      * @return {@inheritDoc}
-     * @throws TooManyEvaluationsException if the maximal number of
-     * evaluations is exceeded.
+     * @throws 
org.apache.commons.math4.legacy.exception.TooManyEvaluationsException
+     * if the maximal number of evaluations is exceeded.
      */
     @Override
-    public PointValuePair optimize(OptimizationData... optData)
-        throws TooManyEvaluationsException {
+    public PointValuePair optimize(OptimizationData... optData) {
         // Set up base class and perform computation.
         return super.optimize(optData);
     }
@@ -107,8 +105,8 @@ public abstract class MultivariateOptimizer
      *
      * @param params Point at which the objective function must be evaluated.
      * @return the objective function value at the specified point.
-     * @throws TooManyEvaluationsException if the maximal number of
-     * evaluations is exceeded.
+     * @throws 
org.apache.commons.math4.legacy.exception.TooManyEvaluationsException
+     * if the maximal number of evaluations is exceeded.
      */
     public double computeObjectiveValue(double[] params) {
         super.incrementEvaluationCount();

Reply via email to