Fixed failing unit test after change to NumberFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1240282 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1388bd7015
commit
109e91c742
|
@ -20,7 +20,7 @@ import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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.UnivariateStatistic;
|
||||||
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
||||||
import org.apache.commons.math.util.DefaultTransformer;
|
import org.apache.commons.math.util.DefaultTransformer;
|
||||||
|
@ -113,7 +113,7 @@ public class ListUnivariateImpl extends DescriptiveStatistics implements Seriali
|
||||||
|
|
||||||
try {
|
try {
|
||||||
value = transformer.transform(list.get(calcIndex));
|
value = transformer.transform(list.get(calcIndex));
|
||||||
} catch (MathException e) {
|
} catch (MathIllegalArgumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ package org.apache.commons.math.util;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.math.MathException;
|
|
||||||
import org.apache.commons.math.TestUtils;
|
import org.apache.commons.math.TestUtils;
|
||||||
|
import org.apache.commons.math.exception.MathIllegalArgumentException;
|
||||||
import org.apache.commons.math.exception.NullArgumentException;
|
import org.apache.commons.math.exception.NullArgumentException;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -98,7 +98,7 @@ public class DefaultTransformerTest {
|
||||||
try {
|
try {
|
||||||
t.transform(input);
|
t.transform(input);
|
||||||
Assert.fail("Expecting MathException");
|
Assert.fail("Expecting MathException");
|
||||||
} catch (MathException e) {
|
} catch (MathIllegalArgumentException e) {
|
||||||
// expected
|
// expected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue