commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1240340 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math: optimization/BatteryNISTTest.java util/TestBean.java
Date Fri, 03 Feb 2012 21:08:59 GMT
Author: tn
Date: Fri Feb  3 21:08:58 2012
New Revision: 1240340

URL: http://svn.apache.org/viewvc?rev=1240340&view=rev
Log:
Removed last use of MathRuntimeException from test classes.
JIRA: MATH-459

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/BatteryNISTTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/BatteryNISTTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/BatteryNISTTest.java?rev=1240340&r1=1240339&r2=1240340&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/BatteryNISTTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/BatteryNISTTest.java
Fri Feb  3 21:08:58 2012
@@ -16,11 +16,11 @@
 package org.apache.commons.math.optimization;
 
 import java.util.Arrays;
-import org.apache.commons.math.MathRuntimeException;
 import org.apache.commons.math.TestUtils;
 import org.apache.commons.math.analysis.DifferentiableMultivariateFunction;
 import org.apache.commons.math.analysis.MultivariateFunction;
 import org.apache.commons.math.analysis.MultivariateVectorFunction;
+import org.apache.commons.math.exception.MathIllegalArgumentException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 import org.apache.commons.math.optimization.direct.BOBYQAOptimizer;
 import org.apache.commons.math.optimization.direct.PowellOptimizer;
@@ -821,8 +821,8 @@ public class BatteryNISTTest {
 
         public nistMVRF(double[] data, int nvars, int nobs, int nparams) {
             if ((nvars + 1) * nobs != data.length) {
-                throw MathRuntimeException.createIllegalArgumentException(
-                        LocalizedFormats.INVALID_REGRESSION_ARRAY, data.length, nobs, nvars);
+                throw new MathIllegalArgumentException(LocalizedFormats.INVALID_REGRESSION_ARRAY,
+                                                       data.length, nobs, nvars);
             }
             this.nobs = nobs;
             this.nvars = nvars;

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java?rev=1240340&r1=1240339&r2=1240340&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/util/TestBean.java Fri
Feb  3 21:08:58 2012
@@ -17,7 +17,7 @@
 
 package org.apache.commons.math.util;
 
-import org.apache.commons.math.MathRuntimeException;
+import org.apache.commons.math.exception.MathUnsupportedOperationException;
 import org.apache.commons.math.exception.util.LocalizedFormats;
 
 /**
@@ -60,7 +60,7 @@ public class TestBean {
      *
      */
     public Double getZ() {
-        throw new MathRuntimeException(LocalizedFormats.SIMPLE_MESSAGE, "?");
+        throw new MathUnsupportedOperationException(LocalizedFormats.SIMPLE_MESSAGE, "?");
     }
 
     /**



Mime
View raw message