Changed deprecated MathRuntimeException to MathIllegalStateException

JIRA: MATH-459

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1239793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2012-02-02 19:51:57 +00:00
parent 75d7b31b6a
commit 11f91fd0eb
1 changed files with 3 additions and 5 deletions

View File

@ -18,7 +18,7 @@ package org.apache.commons.math.stat.descriptive.moment;
import java.io.Serializable; import java.io.Serializable;
import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.exception.MathIllegalStateException;
import org.apache.commons.math.exception.NullArgumentException; import org.apache.commons.math.exception.NullArgumentException;
import org.apache.commons.math.exception.util.LocalizedFormats; import org.apache.commons.math.exception.util.LocalizedFormats;
import org.apache.commons.math.stat.descriptive.AbstractStorelessUnivariateStatistic; import org.apache.commons.math.stat.descriptive.AbstractStorelessUnivariateStatistic;
@ -98,8 +98,7 @@ public class Kurtosis extends AbstractStorelessUnivariateStatistic implements S
if (incMoment) { if (incMoment) {
moment.increment(d); moment.increment(d);
} else { } else {
throw MathRuntimeException.createIllegalStateException( throw new MathIllegalStateException(LocalizedFormats.CANNOT_INCREMENT_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS);
LocalizedFormats.CANNOT_INCREMENT_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS);
} }
} }
@ -132,8 +131,7 @@ public class Kurtosis extends AbstractStorelessUnivariateStatistic implements S
if (incMoment) { if (incMoment) {
moment.clear(); moment.clear();
} else { } else {
throw MathRuntimeException.createIllegalStateException( throw new MathIllegalStateException(LocalizedFormats.CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS);
LocalizedFormats.CANNOT_CLEAR_STATISTIC_CONSTRUCTED_FROM_EXTERNAL_MOMENTS);
} }
} }