diff --git a/src/test/java/org/apache/commons/math/stat/descriptive/ListUnivariateImpl.java b/src/test/java/org/apache/commons/math/stat/descriptive/ListUnivariateImpl.java index 4b505cef6..c996217c7 100644 --- a/src/test/java/org/apache/commons/math/stat/descriptive/ListUnivariateImpl.java +++ b/src/test/java/org/apache/commons/math/stat/descriptive/ListUnivariateImpl.java @@ -20,7 +20,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; -import org.apache.commons.math.MathException; +import org.apache.commons.math.exception.MathIllegalArgumentException; import org.apache.commons.math.stat.descriptive.UnivariateStatistic; import org.apache.commons.math.stat.descriptive.DescriptiveStatistics; import org.apache.commons.math.util.DefaultTransformer; @@ -113,7 +113,7 @@ public class ListUnivariateImpl extends DescriptiveStatistics implements Seriali try { value = transformer.transform(list.get(calcIndex)); - } catch (MathException e) { + } catch (MathIllegalArgumentException e) { e.printStackTrace(); } diff --git a/src/test/java/org/apache/commons/math/util/DefaultTransformerTest.java b/src/test/java/org/apache/commons/math/util/DefaultTransformerTest.java index 277535c46..38c7c5e8d 100644 --- a/src/test/java/org/apache/commons/math/util/DefaultTransformerTest.java +++ b/src/test/java/org/apache/commons/math/util/DefaultTransformerTest.java @@ -20,8 +20,8 @@ package org.apache.commons.math.util; import java.math.BigDecimal; -import org.apache.commons.math.MathException; import org.apache.commons.math.TestUtils; +import org.apache.commons.math.exception.MathIllegalArgumentException; import org.apache.commons.math.exception.NullArgumentException; import org.junit.Assert; import org.junit.Test; @@ -98,7 +98,7 @@ public class DefaultTransformerTest { try { t.transform(input); Assert.fail("Expecting MathException"); - } catch (MathException e) { + } catch (MathIllegalArgumentException e) { // expected } }