Use "MathInternalError" in an impossible "default" case of a "switch".

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1174154 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2011-09-22 14:16:38 +00:00
parent 70c0b99284
commit 0ba7ddcd9e
1 changed files with 5 additions and 4 deletions

View File

@ -28,6 +28,7 @@ import java.util.List;
import org.apache.commons.math.exception.DimensionMismatchException;
import org.apache.commons.math.exception.MathArithmeticException;
import org.apache.commons.math.exception.MathIllegalArgumentException;
import org.apache.commons.math.exception.MathInternalError;
import org.apache.commons.math.exception.NonMonotonousSequenceException;
import org.apache.commons.math.exception.NotFiniteNumberException;
import org.apache.commons.math.exception.NotPositiveException;
@ -1992,7 +1993,7 @@ public final class MathUtils {
break;
default:
// Should never happen.
throw new IllegalArgumentException();
throw new MathInternalError();
}
previous = val[i];
@ -2039,7 +2040,7 @@ public final class MathUtils {
break;
default:
// Should never happen.
throw new IllegalArgumentException();
throw new MathInternalError();
}
previous = val[i];
}
@ -2091,7 +2092,7 @@ public final class MathUtils {
break;
default:
// Should never happen.
throw new IllegalArgumentException();
throw new MathInternalError();
}
previous = val[index];
}
@ -2342,7 +2343,7 @@ public final class MathUtils {
break;
default:
// Should never happen.
throw new IllegalArgumentException();
throw new MathInternalError();
}
return val;
}