From f94991f224f01ba25c0677bf09e3f6e5861acd47 Mon Sep 17 00:00:00 2001 From: Gilles Sadowski Date: Wed, 20 Jul 2022 14:47:45 +0200 Subject: [PATCH] MATH-1589: Remove spurious "throws" clause. --- .../differentiation/DerivativeStructure.java | 162 +++++++----------- .../MultivariateDifferentiableFunction.java | 12 +- .../UnivariateDifferentiableFunction.java | 9 +- 3 files changed, 71 insertions(+), 112 deletions(-) diff --git a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DerivativeStructure.java b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DerivativeStructure.java index 1b7c06905..7812ca6c8 100644 --- a/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DerivativeStructure.java +++ b/commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/analysis/differentiation/DerivativeStructure.java @@ -23,7 +23,6 @@ import org.apache.commons.math4.legacy.core.Field; import org.apache.commons.math4.legacy.core.FieldElement; import org.apache.commons.math4.legacy.core.RealFieldElement; import org.apache.commons.math4.legacy.exception.DimensionMismatchException; -import org.apache.commons.math4.legacy.exception.MathArithmeticException; import org.apache.commons.math4.legacy.exception.NumberIsTooLargeException; import org.apache.commons.math4.core.jdkmath.JdkMath; import org.apache.commons.math4.legacy.core.MathArrays; @@ -76,10 +75,9 @@ public class DerivativeStructure implements RealFieldElement= parameters) { @@ -130,11 +126,11 @@ public class DerivativeStructure implements RealFieldElementx2 +y2) - * @exception DimensionMismatchException if number of free parameters + * @throws DimensionMismatchException if number of free parameters * or orders do not match * @since 3.2 */ - public static DerivativeStructure hypot(final DerivativeStructure x, final DerivativeStructure y) - throws DimensionMismatchException { + public static DerivativeStructure hypot(final DerivativeStructure x, final DerivativeStructure y) { return x.hypot(y); } @@ -598,11 +583,10 @@ public class DerivativeStructure implements RealFieldElementThis interface represents a simple function which computes @@ -34,10 +33,8 @@ public interface UnivariateDifferentiableFunction extends UnivariateFunction { * value and the first derivative of the function.

* @param t function input value * @return function result - * @exception DimensionMismatchException if t is inconsistent with the - * function's free parameters or order + * @throws org.apache.commons.math4.legacy.exception.DimensionMismatchException + * if {@code t} is inconsistent with the function's free parameters or order. */ - DerivativeStructure value(DerivativeStructure t) - throws DimensionMismatchException; - + DerivativeStructure value(DerivativeStructure t); }