Author: erans
Date: Thu Sep 22 14:16:38 2011
New Revision: 1174154
URL: http://svn.apache.org/viewvc?rev=1174154&view=rev
Log:
Use "MathInternalError" in an impossible "default" case of a "switch".
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1174154&r1=1174153&r2=1174154&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Thu Sep 22 14:16:38 2011
@@ -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;
}