Replaced obsolete exceptions.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1178223 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Phil Steitz 2011-10-02 19:03:49 +00:00
parent 9f0e8ef283
commit 2059461aff
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ import java.util.Iterator;
import java.util.Comparator;
import java.util.TreeMap;
import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.exception.util.LocalizedFormats;
/**
@ -121,7 +121,7 @@ public class Frequency implements Serializable {
}
} catch (ClassCastException ex) {
//TreeMap will throw ClassCastException if v is not comparable
throw MathRuntimeException.createIllegalArgumentException(
throw new MathIllegalArgumentException(
LocalizedFormats.INSTANCES_NOT_COMPARABLE_TO_EXISTING_VALUES,
v.getClass().getName());
}