You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2009/02/21 21:01:17 UTC

svn commit: r746578 [1/3] - in /commons/proper/math/trunk/src: experimental/org/apache/commons/math/linear/ java/org/apache/commons/math/ java/org/apache/commons/math/analysis/integration/ java/org/apache/commons/math/analysis/minimization/ java/org/ap...

Author: luc
Date: Sat Feb 21 20:01:14 2009
New Revision: 746578

URL: http://svn.apache.org/viewvc?rev=746578&view=rev
Log:
replaced Object[] parameters by variable arguments in exceptions constructors
this allows simpler error declaration and removes the need for the strange
null argument with fixed messages

Modified:
    commons/proper/math/trunk/src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ArgumentOutsideDomainException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/DimensionMismatchException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/FunctionEvaluationException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MathConfigurationException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MaxIterationsExceededException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/minimization/UnivariateRealMinimizerImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BrentSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/complex/Complex.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionConversionException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/CardanEulerSingularityException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/NotARotationMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Rotation.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3D.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/geometry/Vector3DFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/AbstractRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/BigMatrixImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/DenseRealMatrix.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/InvalidMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixIndexException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealMatrixImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealVectorFormat.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/RealVectorImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/SparseRealVector.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/CholeskyDecompositionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/EigenDecompositionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/LUDecompositionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/NonSquareMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/NotPositiveDefiniteMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/NotSymmetricMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/QRDecompositionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/SingularMatrixException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/decomposition/SingularValueDecompositionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/AbstractIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/ContinuousOutputModel.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/DerivativeException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/IntegratorException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/events/EventException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/events/EventState.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdaptiveStepsizeIntegrator.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/CostException.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/optimization/DirectSearchOptimizer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomAdaptor.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/ValueServer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/Covariance.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/correlation/PearsonsCorrelation.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/MultivariateSummaryStatistics.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/SummaryStatistics.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/moment/GeometricMean.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/stat/descriptive/moment/Kurtosis.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastCosineTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastFourierTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastHadamardTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/transform/FastSineTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/ContinuedFraction.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/DefaultTransformer.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
    commons/proper/math/trunk/src/java/org/apache/commons/math/util/ResizableDoubleArray.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/ConvergenceExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/FunctionEvaluationExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/MathConfigurationExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/MathExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/MaxIterationsExceededExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/BigMatrixImplTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/InvalidMatrixExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/MatrixIndexExceptionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/decomposition/CholeskySolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/decomposition/EigenSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/decomposition/LUSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/decomposition/QRSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/linear/decomposition/SingularValueSolverTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/ode/FirstOrderConverterTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/ode/nonstiff/HighamHall54IntegratorTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/MultiDirectionalTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/optimization/NelderMeadTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/stat/regression/OLSMultipleLinearRegressionTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/util/TestBean.java

Modified: commons/proper/math/trunk/src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java (original)
+++ commons/proper/math/trunk/src/experimental/org/apache/commons/math/linear/RecursiveLayoutRealMatrix.java Sat Feb 21 20:01:14 2009
@@ -173,11 +173,9 @@
         // create storage array
         final int expectedLength = tileNumber * tileNumber * tileSizeRows * tileSizeColumns;
         if (data.length != expectedLength) {
-            throw MathRuntimeException.createIllegalArgumentException("wrong array size (got {0}, expected {1})",
-                                                                      new Object[] {
-                                                                          data.length,
-                                                                          expectedLength
-                                                                      });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "wrong array size (got {0}, expected {1})",
+                    data.length, expectedLength);
         }
 
         if (copyArray) {
@@ -222,7 +220,7 @@
             if (length != columns) {
                 throw MathRuntimeException.createIllegalArgumentException(
                         "some rows have length {0} while others have length {1}",
-                        new Object[] { columns, length }); 
+                        columns, length); 
             }
         }
 
@@ -1028,10 +1026,9 @@
         checkSubMatrixIndex(row, endRow, column, endColumn);
         for (final double[] subRow : subMatrix) {
             if (subRow.length != refLength) {
-                throw MathRuntimeException.createIllegalArgumentException("some rows have length {0} while others have length {1}",
-                                                                          new Object[] {
-                                                                              refLength, subRow.length
-                                                                          }); 
+                throw MathRuntimeException.createIllegalArgumentException(
+                        "some rows have length {0} while others have length {1}",
+                        refLength, subRow.length); 
             }
         }
 
@@ -1118,12 +1115,10 @@
         final int nCols = getColumnDimension();
         if ((matrix.getRowDimension() != 1) ||
             (matrix.getColumnDimension() != nCols)) {
-            throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                             new Object[] {
-                                                 matrix.getRowDimension(),
-                                                 matrix.getColumnDimension(),
-                                                 1, nCols
-                                             });
+            throw new InvalidMatrixException(
+                    "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                    matrix.getRowDimension(), matrix.getColumnDimension(),
+                    1, nCols);
         }
 
         // a row matrix has always only one large tile,
@@ -1196,12 +1191,10 @@
         final int nRows = getRowDimension();
         if ((matrix.getRowDimension() != nRows) ||
             (matrix.getColumnDimension() != 1)) {
-            throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                             new Object[] {
-                                                 matrix.getRowDimension(),
-                                                 matrix.getColumnDimension(),
-                                                 nRows, 1
-                                             });
+            throw new InvalidMatrixException(
+                    "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                    matrix.getRowDimension(), matrix.getColumnDimension(),
+                    nRows, 1);
         }
 
         // a column matrix has always only one large tile,
@@ -1229,11 +1222,9 @@
         } catch (ClassCastException cce) {
             checkRowIndex(row);
             if (vector.getDimension() != columns) {
-                throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                                 new Object[] {
-                                                     1, vector.getDimension(),
-                                                     1, columns
-                                                 });
+                throw new InvalidMatrixException(
+                        "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                        1, vector.getDimension(), 1, columns);
             }
 
             // perform copy tile-wise, to ensure good cache behavior
@@ -1260,11 +1251,9 @@
         } catch (ClassCastException cce) {
             checkColumnIndex(column);
             if (vector.getDimension() != rows) {
-                throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                                 new Object[] {
-                                                     vector.getDimension(), 1,
-                                                     rows, 1
-                                                 });
+                throw new InvalidMatrixException(
+                        "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                        vector.getDimension(), 1, rows, 1);
             }
 
             // perform copy tile-wise, to ensure good cache behavior
@@ -1311,11 +1300,9 @@
 
         checkRowIndex(row);
         if (array.length != columns) {
-            throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                             new Object[] {
-                                                 1, array.length,
-                                                 1, columns
-                                             });
+            throw new InvalidMatrixException(
+                    "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                    1, array.length, 1, columns);
         }
 
         // perform copy tile-wise, to ensure good cache behavior
@@ -1362,11 +1349,9 @@
 
         checkColumnIndex(column);
         if (array.length != rows) {
-            throw new InvalidMatrixException("dimensions mismatch: got {0}x{1} but expected {2}x{3}",
-                                             new Object[] {
-                                                 array.length, 1,
-                                                 rows, 1
-                                             });
+            throw new InvalidMatrixException(
+                    "dimensions mismatch: got {0}x{1} but expected {2}x{3}",
+                    array.length, 1, rows, 1);
         }
 
         // perform copy tile-wise, to ensure good cache behavior
@@ -1388,11 +1373,9 @@
     public double getEntry(final int row, final int column)
         throws MatrixIndexException {
         if ((row < 0) || (row >= rows) || (column < 0) || (column >= columns)) {
-            throw new MatrixIndexException("no entry at indices ({0}, {1}) in a {2}x{3} matrix",
-                                           new Object[] {
-                                               row, column,
-                                               getRowDimension(), getColumnDimension()
-                                           });
+            throw new MatrixIndexException(
+                    "no entry at indices ({0}, {1}) in a {2}x{3} matrix",
+                    row, column, getRowDimension(), getColumnDimension());
         }
         return data[index(row, column)];
     }
@@ -1401,11 +1384,9 @@
     public void setEntry(final int row, final int column, final double value)
         throws MatrixIndexException {
         if ((row < 0) || (row >= rows) || (column < 0) || (column >= columns)) {
-            throw new MatrixIndexException("no entry at indices ({0}, {1}) in a {2}x{3} matrix",
-                                           new Object[] {
-                                               row, column,
-                                               getRowDimension(), getColumnDimension()
-                                           });
+            throw new MatrixIndexException(
+                    "no entry at indices ({0}, {1}) in a {2}x{3} matrix",
+                    row, column, getRowDimension(), getColumnDimension());
         }
         data[index(row, column)] = value;
     }
@@ -1414,11 +1395,9 @@
     public void addToEntry(final int row, final int column, final double increment)
         throws MatrixIndexException {
         if ((row < 0) || (row >= rows) || (column < 0) || (column >= columns)) {
-            throw new MatrixIndexException("no entry at indices ({0}, {1}) in a {2}x{3} matrix",
-                                           new Object[] {
-                                               row, column,
-                                               getRowDimension(), getColumnDimension()
-                                           });
+            throw new MatrixIndexException(
+                    "no entry at indices ({0}, {1}) in a {2}x{3} matrix",
+                    row, column, getRowDimension(), getColumnDimension());
         }
         data[index(row, column)] += increment;
     }
@@ -1427,11 +1406,9 @@
     public void multiplyEntry(final int row, final int column, final double factor)
         throws MatrixIndexException {
         if ((row < 0) || (row >= rows) || (column < 0) || (column >= columns)) {
-            throw new MatrixIndexException("no entry at indices ({0}, {1}) in a {2}x{3} matrix",
-                                           new Object[] {
-                                               row, column,
-                                               getRowDimension(), getColumnDimension()
-                                           });
+            throw new MatrixIndexException(
+                    "no entry at indices ({0}, {1}) in a {2}x{3} matrix",
+                    row, column, getRowDimension(), getColumnDimension());
         }
         data[index(row, column)] *= factor;
     }
@@ -1486,11 +1463,9 @@
         throws IllegalArgumentException {
 
         if (v.length != columns) {
-            throw MathRuntimeException.createIllegalArgumentException("vector length mismatch:" +
-                                                                      " got {0} but expected {1}",
-                                                                      new Object[] {
-                                                                          v.length, columns
-                                                                      });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "vector length mismatch: got {0} but expected {1}",
+                    v.length, columns);
         }
         final double[] out = new double[rows];
 
@@ -1531,11 +1506,9 @@
         throws IllegalArgumentException {
 
         if (v.length != rows) {
-            throw MathRuntimeException.createIllegalArgumentException("vector length mismatch:" +
-                                                                      " got {0} but expected {1}",
-                                                                      new Object[] {
-                                                                          v.length, rows
-                                                                      });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "vector length mismatch: got {0} but expected {1}",
+                    v.length, rows);
         }
         final double[] out = new double[columns];
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ArgumentOutsideDomainException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ArgumentOutsideDomainException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ArgumentOutsideDomainException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ArgumentOutsideDomainException.java Sat Feb 21 20:01:14 2009
@@ -37,8 +37,7 @@
      */
     public ArgumentOutsideDomainException(double argument, double lower, double upper) {
         super(argument,
-              "Argument {0} outside domain [{1} ; {2}]",
-              new Object[] { Double.valueOf(argument), Double.valueOf(lower), Double.valueOf(upper) });
+              "Argument {0} outside domain [{1} ; {2}]", argument, lower, upper);
     }
 
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/ConvergenceException.java Sat Feb 21 20:01:14 2009
@@ -25,13 +25,13 @@
 public class ConvergenceException extends MathException {
     
     /** Serializable version identifier */
-    private static final long serialVersionUID = 4380655778005469702L;
+    private static final long serialVersionUID = 4883703247677159141L;
 
     /**
      * Default constructor.
      */
     public ConvergenceException() {
-        super("Convergence failed", null);
+        super("Convergence failed");
     }
     
     /**
@@ -41,7 +41,7 @@
      * @param arguments format arguments
      * @since 1.2
      */
-    public ConvergenceException(String pattern, Object[] arguments) {
+    public ConvergenceException(String pattern, Object ... arguments) {
         super(pattern, arguments);
     }
 
@@ -56,13 +56,13 @@
     /**
      * Constructs an exception with specified formatted detail message and root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
+     * @param cause  the exception or error that caused this exception to be thrown
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param cause  the exception or error that caused this exception to be thrown
      * @since 1.2
      */
-    public ConvergenceException(String pattern, Object[] arguments, Throwable cause) {
-        super(pattern, arguments, cause);
+    public ConvergenceException(Throwable cause, String pattern, Object ... arguments) {
+        super(cause, pattern, arguments);
     }
-    
+
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/DimensionMismatchException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/DimensionMismatchException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/DimensionMismatchException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/DimensionMismatchException.java Sat Feb 21 20:01:14 2009
@@ -33,10 +33,7 @@
      * @param dimension2 second dimension
      */
     public DimensionMismatchException(int dimension1, int dimension2) {
-        super("dimension mismatch {0} != {1}",
-              new Object[] {
-                Integer.valueOf(dimension1), Integer.valueOf(dimension2)
-              });
+        super("dimension mismatch {0} != {1}", dimension1, dimension2);
         this.dimension1 = dimension1;
         this.dimension2 = dimension2;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/DuplicateSampleAbscissaException.java Sat Feb 21 20:01:14 2009
@@ -35,7 +35,7 @@
      */
     public DuplicateSampleAbscissaException(double abscissa, int i1, int i2) {
         super("Abscissa {0} is duplicated at both indices {1} and {2}",
-              new Object[] { Double.valueOf(abscissa), Integer.valueOf(i1), Integer.valueOf(i2) });
+              abscissa, i1, i2);
     }
 
     /**

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/FunctionEvaluationException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/FunctionEvaluationException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/FunctionEvaluationException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/FunctionEvaluationException.java Sat Feb 21 20:01:14 2009
@@ -27,7 +27,7 @@
 public class FunctionEvaluationException extends MathException  {
     
     /** Serializable version identifier. */
-    private static final long serialVersionUID = -2193260774031645876L;
+    private static final long serialVersionUID = -7267500407292949362L;
 
     /** Argument causing function evaluation failure */
     private double argument = Double.NaN;
@@ -39,8 +39,7 @@
      * @param argument  the failing function argument 
      */
     public FunctionEvaluationException(double argument) {
-        super("Evaluation failed for argument = {0}",
-              new Object[] { Double.valueOf(argument) });
+        super("Evaluation failed for argument = {0}", Double.valueOf(argument));
         this.argument = argument;
     }
     
@@ -53,7 +52,7 @@
      * @since 1.2
      */
     public FunctionEvaluationException(double argument,
-                                       String pattern, Object[] arguments) {
+                                       String pattern, Object ... arguments) {
         super(pattern, arguments);
         this.argument = argument;
     }
@@ -61,11 +60,11 @@
     /**
      * Constructs an exception with specified root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
-     * @param argument  the failing function argument 
      * @param cause  the exception or error that caused this exception to be thrown
+     * @param argument  the failing function argument 
      * @since 1.2
      */
-    public FunctionEvaluationException(double argument, Throwable cause) {
+    public FunctionEvaluationException(Throwable cause, double argument) {
         super(cause);
         this.argument = argument;
     }
@@ -73,16 +72,16 @@
     /**
      * Constructs an exception with specified formatted detail message and root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
+     * @param cause  the exception or error that caused this exception to be thrown
      * @param argument  the failing function argument 
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param cause  the exception or error that caused this exception to be thrown
      * @since 1.2
      */
-    public FunctionEvaluationException(double argument,
-                                       String pattern, Object[] arguments,
-                                       Throwable cause) {
-        super(pattern, arguments, cause);
+    public FunctionEvaluationException(Throwable cause,
+                                       double argument, String pattern,
+                                       Object ... arguments) {
+        super(cause, pattern, arguments);
         this.argument = argument;
     }
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MathConfigurationException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MathConfigurationException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MathConfigurationException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MathConfigurationException.java Sat Feb 21 20:01:14 2009
@@ -41,7 +41,7 @@
      * @param arguments format arguments
      * @since 1.2
      */
-    public MathConfigurationException(String pattern, Object[] arguments) {
+    public MathConfigurationException(String pattern, Object ... arguments) {
         super(pattern, arguments);
     }
 
@@ -56,13 +56,13 @@
     /**
      * Constructs an exception with specified formatted detail message and root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
+     * @param cause  the exception or error that caused this exception to be thrown
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param cause  the exception or error that caused this exception to be thrown
      * @since 1.2
      */
-    public MathConfigurationException(String pattern, Object[] arguments, Throwable cause) {
-        super(pattern, arguments, cause);
+    public MathConfigurationException(Throwable cause, String pattern, Object ... arguments) {
+        super(cause, pattern, arguments);
     }
 
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MathException.java Sat Feb 21 20:01:14 2009
@@ -36,7 +36,7 @@
 public class MathException extends Exception {
     
     /** Serializable version identifier. */
-    private static final long serialVersionUID = 5924076008552401454L;
+    private static final long serialVersionUID = -2803873247432645339L;
 
     /** Cache for resources bundle. */
     private static ResourceBundle cachedResources = null;
@@ -83,12 +83,12 @@
 
     /**
      * Builds a message string by from a pattern and its arguments.
+     * @param locale Locale in which the message should be translated
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param locale Locale in which the message should be translated
      * @return a message string
      */
-    private static String buildMessage(String pattern, Object[] arguments, Locale locale) {
+    private static String buildMessage(Locale locale, String pattern, Object ... arguments) {
         return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);        
     }
 
@@ -109,8 +109,8 @@
      * @param pattern format specifier
      * @param arguments format arguments
      */
-    public MathException(String pattern, Object[] arguments) {
-      super(buildMessage(pattern, arguments, Locale.US));
+    public MathException(String pattern, Object ... arguments) {
+      super(buildMessage(Locale.US, pattern, arguments));
       this.pattern   = pattern;
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
@@ -132,14 +132,14 @@
      * Constructs a new <code>MathException</code> with specified
      * formatted detail message and nested <code>Throwable</code> root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
-     * @param pattern format specifier
-     * @param arguments format arguments
      * @param rootCause the exception or error that caused this exception
      * to be thrown.
+     * @param pattern format specifier
+     * @param arguments format arguments
      * @since 1.2
      */
-    public MathException(String pattern, Object[] arguments, Throwable rootCause) {
-      super(buildMessage(pattern, arguments, Locale.US), rootCause);
+    public MathException(Throwable rootCause, String pattern, Object ... arguments) {
+      super(buildMessage(Locale.US, pattern, arguments), rootCause);
       this.pattern   = pattern;
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
@@ -170,7 +170,7 @@
      * @since 1.2
      */
     public String getMessage(Locale locale) {
-        return buildMessage(pattern, arguments, locale);
+        return buildMessage(locale, pattern, arguments);
     }
 
     /** {@inheritDoc} */

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MathRuntimeException.java Sat Feb 21 20:01:14 2009
@@ -37,7 +37,7 @@
 public class MathRuntimeException extends RuntimeException {
     
     /** Serializable version identifier. */
-    private static final long serialVersionUID = -143052521750625264L;
+    private static final long serialVersionUID = 4184290229453587356L;
 
     /** Cache for resources bundle. */
     private static ResourceBundle cachedResources = null;
@@ -84,13 +84,13 @@
 
     /**
      * Builds a message string by from a pattern and its arguments.
+     * @param locale Locale in which the message should be translated
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param locale Locale in which the message should be translated
      * @return a message string
      */
-    private static String buildMessage(final String pattern, final Object[] arguments,
-                                       final Locale locale) {
+    private static String buildMessage(final Locale locale, final String pattern,
+                                       final Object ... arguments) {
         return (pattern == null) ? "" : new MessageFormat(translate(pattern, locale), locale).format(arguments);        
     }
 
@@ -101,8 +101,8 @@
      * @param pattern format specifier
      * @param arguments format arguments
      */
-    public MathRuntimeException(final String pattern, final Object[] arguments) {
-      super(buildMessage(pattern, arguments, Locale.US));
+    public MathRuntimeException(final String pattern, final Object ... arguments) {
+      super(buildMessage(Locale.US, pattern, arguments));
       this.pattern   = pattern;
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
@@ -124,14 +124,14 @@
      * Constructs a new <code>MathRuntimeException</code> with specified
      * formatted detail message and nested <code>Throwable</code> root cause.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
-     * @param pattern format specifier
-     * @param arguments format arguments
      * @param rootCause the exception or error that caused this exception
      * to be thrown.
+     * @param pattern format specifier
+     * @param arguments format arguments
      */
-    public MathRuntimeException(final String pattern, final Object[] arguments,
-                                final Throwable rootCause) {
-      super(buildMessage(pattern, arguments, Locale.US), rootCause);
+    public MathRuntimeException(final Throwable rootCause,
+                                final String pattern, final Object ... arguments) {
+      super(buildMessage(Locale.US, pattern, arguments), rootCause);
       this.pattern   = pattern;
       this.arguments = (arguments == null) ? new Object[0] : arguments.clone();
     }
@@ -159,7 +159,7 @@
      * @return localized message
      */
     public String getMessage(final Locale locale) {
-        return buildMessage(pattern, arguments, locale);
+        return buildMessage(locale, pattern, arguments);
     }
 
     /** {@inheritDoc} */
@@ -196,15 +196,15 @@
      * @return built exception
      */
     public static ArithmeticException createArithmeticException(final String pattern,
-                                                                final Object[] arguments) {
-        return new ArithmeticException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                final Object ... arguments) {
+        return new ArithmeticException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
             private static final long serialVersionUID = 7705628723242533939L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -218,15 +218,15 @@
      * @return built exception
      */
     public static ArrayIndexOutOfBoundsException createArrayIndexOutOfBoundsException(final String pattern,
-                                                                                      final Object[] arguments) {
-        return new ArrayIndexOutOfBoundsException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                                      final Object ... arguments) {
+        return new ArrayIndexOutOfBoundsException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
-            private static final long serialVersionUID = 8077627622976962141L;
+            private static final long serialVersionUID = -3394748305449283486L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -240,15 +240,15 @@
      * @return built exception
      */
     public static EOFException createEOFException(final String pattern,
-                                                  final Object[] arguments) {
-        return new EOFException(buildMessage(pattern, arguments, Locale.US)) {
+                                                  final Object ... arguments) {
+        return new EOFException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
             private static final long serialVersionUID = 279461544586092584L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -279,15 +279,15 @@
      * @return built exception
      */
     public static IllegalArgumentException createIllegalArgumentException(final String pattern,
-                                                                          final Object[] arguments) {
-        return new IllegalArgumentException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                          final Object ... arguments) {
+        return new IllegalArgumentException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
-            private static final long serialVersionUID = -7537852425838457684L;
+            private static final long serialVersionUID = -6555453980658317913L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -301,15 +301,15 @@
      * @return built exception
      */
     public static IllegalStateException createIllegalStateException(final String pattern,
-                                                                    final Object[] arguments) {
-        return new IllegalStateException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                    final Object ... arguments) {
+        return new IllegalStateException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
-            private static final long serialVersionUID = 5173599768297434381L;
+            private static final long serialVersionUID = -95247648156277208L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -323,15 +323,15 @@
      * @return built exception
      */
     public static ConcurrentModificationException createConcurrentModificationException(final String pattern,
-                                                                                        final Object[] arguments) {
-        return new ConcurrentModificationException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                                        final Object ... arguments) {
+        return new ConcurrentModificationException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
             private static final long serialVersionUID = 6134247282754009421L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -345,15 +345,15 @@
      * @return built exception
      */
     public static NoSuchElementException createNoSuchElementException(final String pattern,
-                                                                      final Object[] arguments) {
-        return new NoSuchElementException(buildMessage(pattern, arguments, Locale.US)) {
+                                                                      final Object ... arguments) {
+        return new NoSuchElementException(buildMessage(Locale.US, pattern, arguments)) {
 
             /** Serializable version identifier. */
             private static final long serialVersionUID = 7304273322489425799L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };
@@ -363,22 +363,22 @@
      * Constructs a new <code>ParseException</code> with specified
      * formatted detail message.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
+     * @param offset offset at which error occurred
      * @param pattern format specifier
      * @param arguments format arguments
-     * @param offset offset at which error occurred
      * @return built exception
      */
-    public static ParseException createParseException(final String pattern,
-                                                      final Object[] arguments,
-                                                      final int offset) {
-        return new ParseException(buildMessage(pattern, arguments, Locale.US), offset) {
+    public static ParseException createParseException(final int offset,
+                                                      final String pattern,
+                                                      final Object ... arguments) {
+        return new ParseException(buildMessage(Locale.US, pattern, arguments), offset) {
 
             /** Serializable version identifier. */
             private static final long serialVersionUID = -1103502177342465975L;
 
             /** {@inheritDoc} */
             public String getLocalizedMessage() {
-                return buildMessage(pattern, arguments, Locale.getDefault());
+                return buildMessage(Locale.getDefault(), pattern, arguments);
             }
 
         };

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MaxIterationsExceededException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MaxIterationsExceededException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MaxIterationsExceededException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MaxIterationsExceededException.java Sat Feb 21 20:01:14 2009
@@ -29,19 +29,18 @@
 public class MaxIterationsExceededException extends ConvergenceException {
 
     /** Serializable version identifier. */
-    private static final long serialVersionUID = -2154780004193976271L;
+    private static final long serialVersionUID = -7821226672760574694L;
 
     /** Maximal number of iterations allowed. */
-    private int maxIterations;
+    private final int maxIterations;
 
     /**
      * Constructs an exception with specified formatted detail message.
      * Message formatting is delegated to {@link java.text.MessageFormat}.
      * @param maxIterations maximal number of iterations allowed
      */
-    public MaxIterationsExceededException(int maxIterations) {
-        super("Maximal number of iterations ({0}) exceeded",
-              new Object[] { Integer.valueOf(maxIterations) });
+    public MaxIterationsExceededException(final int maxIterations) {
+        super("Maximal number of iterations ({0}) exceeded", maxIterations);
         this.maxIterations = maxIterations;
     }
 
@@ -52,8 +51,8 @@
      * @param pattern format specifier
      * @param arguments format arguments
      */
-    public MaxIterationsExceededException(int maxIterations,
-                                          String pattern, Object[] arguments) {
+    public MaxIterationsExceededException(final int maxIterations,
+                                          final String pattern, final Object ... arguments) {
         super(pattern, arguments);
         this.maxIterations = maxIterations;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/MessagesResources_fr.java Sat Feb 21 20:01:14 2009
@@ -47,7 +47,7 @@
     // org.apache.commons.math.util.MathUtils
     { "overflow: gcd({0}, {1}) is 2^31",
       "d\u00e9passement de capacit\u00e9 : le PGCD de {0} et {1} vaut 2^31" },
-      
+        
     // org.apache.commons.math.FunctionEvaluationException
     { "Evaluation failed for argument = {0}",
       "Erreur d''\u00e9valuation pour l''argument {0}" },
@@ -284,6 +284,30 @@
      "impossible de mettre un \u00e9l\u00e9ment \u00e0 un index n\u00e9gatif ({0})" },
    { "cannot substitute an element from an empty array",
      "impossible de substituer un \u00e9l\u00e9ment dans un tableau vide" },
+   { "contraction criteria ({0}) smaller than the expansion factor ({1}).  This would " +
+     "lead to a never ending loop of expansion and contraction as a newly expanded " +
+     "internal storage array would immediately satisfy the criteria for contraction.",
+     "crit\u00e8re de contraction ({0}) inf\u00e9rieur au facteur d''extension. Ceci " +
+     "induit une boucle infinie d''extensions/contractions car tout tableau de stockage " +
+     "fra\u00eechement \u00e9tendu respecte imm\u00e9diatement le crit\u00e8re de contraction."},
+   { "contraction criteria smaller than one ({0}).  This would lead to a never ending " +
+     "loop of expansion and contraction as an internal storage array length equal " +
+     "to the number of elements would satisfy the contraction criteria.",
+     "crit\u00e8re de contraction inf\u00e9rieur \u00e0 un ({0}). Ceci induit une boucle " +
+     "infinie d''extensions/contractions car tout tableau de stockage de longueur \u00e9gale " +
+     "au nombre d''\u00e9l\u00e9ments respecte le crit\u00e8re de contraction." },
+   { "expansion factor smaller than one ({0})",
+     "facteur d''extension inf\u00e9rieur \u00e0 un ({0})"},
+   { "cannot discard {0} elements from a {1} elements array",
+     "impossible d''enlever {0} \u00e9l\u00e9ments d''un tableau en contenant {1}"},
+   { "cannot discard a negative number of elements ({0})",
+     "impossible d''enlever un nombre d''\u00e9l\u00e9ments{0} n\u00e9gatif"},
+   { "unsupported expansion mode {0}, supported modes are {1} ({2}) and {3} ({4})",
+     "mode d''extension {0} no support\u00e9, les modes support\u00e9s sont {1} ({2}) et {3} ({4})" },
+   { "initial capacity ({0}) is not positive",
+     "la capacit\u00e9 initiale ({0}) n''est pas positive" },
+   { "index ({0}) is not positive",
+     "l''indice ({0}) n''est pas positif" },
 
    // org.apache.commons.math.analysis.polynomials.PolynomialFunctionLagrangeForm
    { "identical abscissas x[{0}] == x[{1}] == {2} cause division by zero",
@@ -365,6 +389,20 @@
    { "digest not initialized",
      "mod\u00e8le empirique non initialis\u00e9" },
 
+   // org.apache.commons.math.stat.correlation.Covariance
+   { "arrays must have the same length and both must have at " +
+     "least two elements. xArray has size {0}, yArray has {1} elements",
+     "les tableaux doivent avoir la m\u00eame taille et comporter au moins deux \u00e9l\u00e9ments. " +
+     "xArray a une taille de {0}, yArray a {1} \u00e9l\u00e9ments"},
+   { "insufficient data: only {0} rows and {1} columns.",
+     "donn\u00e9es insuffisantes : seulement {0} lignes et {1} colonnes." },
+
+   // org.apache.commons.math.stat.correlation.PearsonsCorrelation
+   { "covariance matrix is null",
+     "la matrice de covariance est nulle" },
+   { "invalid array dimensions. xArray has size {0}; yArray has {1} elements",
+     "dimensions de tableaux invalides. xArray a une taille de {0}, yArray a {1} \u00e9l\u00e9ments" },
+
    // org.apache.commons.math.stat.descriptive.moment.GeometricMean
    // org.apache.commons.math.stat.descriptive.MultivariateSummaryStatistics
    // org.apache.commons.math.stat.descriptive.SummaryStatistics

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/LegendreGaussIntegrator.java Sat Feb 21 20:01:14 2009
@@ -150,7 +150,7 @@
             throw MathRuntimeException.createIllegalArgumentException(
                     "{0} points Legendre-Gauss integrator not supported, " +
                     "number of points must be in the {1}-{2} range",
-                    new Object[] { n, 2, 5 });
+                    n, 2, 5);
         }
 
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/RombergIntegrator.java Sat Feb 21 20:01:14 2009
@@ -112,7 +112,7 @@
         if (maximalIterationCount > 32) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "invalid iteration limits: min={0}, max={1}",
-                    new Object[] { 0, 32 });
+                    0, 32);
         }
     }
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/SimpsonIntegrator.java Sat Feb 21 20:01:14 2009
@@ -111,7 +111,7 @@
         if (maximalIterationCount > 64) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "invalid iteration limits: min={0}, max={1}",
-                    new Object[] { 0, 64 });
+                    0, 64);
         }
     }
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/TrapezoidIntegrator.java Sat Feb 21 20:01:14 2009
@@ -144,7 +144,7 @@
         if (maximalIterationCount > 64) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "invalid iteration limits: min={0}, max={1}",
-                    new Object[] { 0, 64 });
+                    0, 64);
         }
     }
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/integration/UnivariateRealIntegratorImpl.java Sat Feb 21 20:01:14 2009
@@ -108,7 +108,7 @@
         if (resultComputed) {
             return result;
         } else {
-            throw MathRuntimeException.createIllegalStateException("no result available", null);
+            throw MathRuntimeException.createIllegalStateException("no result available");
         }
     }
 
@@ -159,7 +159,7 @@
         if (lower >= upper) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "endpoints do not specify an interval: [{0}, {1}]",
-                    new Object[] { lower, upper });
+                    lower, upper);
         }       
     }
 
@@ -172,7 +172,7 @@
         if ((minimalIterationCount <= 0) || (maximalIterationCount <= minimalIterationCount)) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "invalid iteration limits: min={0}, max={1}",
-                    new Object[] { minimalIterationCount, maximalIterationCount });
+                    minimalIterationCount, maximalIterationCount);
         }       
     }
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/minimization/UnivariateRealMinimizerImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/minimization/UnivariateRealMinimizerImpl.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/minimization/UnivariateRealMinimizerImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/minimization/UnivariateRealMinimizerImpl.java Sat Feb 21 20:01:14 2009
@@ -60,7 +60,7 @@
      */
     protected void checkResultComputed() throws IllegalStateException {
         if (!resultComputed) {
-            throw MathRuntimeException.createIllegalStateException("no result available", null);
+            throw MathRuntimeException.createIllegalStateException("no result available");
         }
     }
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/polynomials/PolynomialFunctionLagrangeForm.java Sat Feb 21 20:01:14 2009
@@ -91,7 +91,7 @@
         try {
             return evaluate(x, y, z);
         } catch (DuplicateSampleAbscissaException e) {
-            throw new FunctionEvaluationException(z, e.getPattern(), e.getArguments(), e);
+            throw new FunctionEvaluationException(e, z, e.getPattern(), e.getArguments());
         }
     }
 
@@ -258,9 +258,7 @@
                 for (int k = 0; k < n; ++k) {
                     if ((i != k) && (x[i] == x[k])) {
                         throw MathRuntimeException.createArithmeticException("identical abscissas x[{0}] == x[{1}] == {2} cause division by zero",
-                                                                             new Object[] {
-                                                                                 i, k, x[i]
-                                                                             });
+                                                                             i, k, x[i]);
                     }
                 }
             }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BrentSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BrentSolver.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BrentSolver.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/BrentSolver.java Sat Feb 21 20:01:14 2009
@@ -178,7 +178,7 @@
                 throw MathRuntimeException.createIllegalArgumentException(
                         "function values at endpoints do not have different signs.  " +
                         "Endpoints: [{0}, {1}], Values: [{2}, {3}]",
-                        new Object[] { min, max, yMin, yMax });       
+                        min, max, yMin, yMax);       
             }
         } else if (sign < 0){
             // solve using only the first endpoint as initial guess

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/LaguerreSolver.java Sat Feb 21 20:01:14 2009
@@ -64,7 +64,7 @@
         if (f instanceof PolynomialFunction) {
             p = (PolynomialFunction) f;
         } else {
-            throw MathRuntimeException.createIllegalArgumentException("function is not polynomial", null);
+            throw MathRuntimeException.createIllegalArgumentException("function is not polynomial");
         }
     }
 
@@ -160,7 +160,7 @@
 
         // check function type
         if (!(f instanceof PolynomialFunction)) {
-            throw MathRuntimeException.createIllegalArgumentException("function is not polynomial", null);
+            throw MathRuntimeException.createIllegalArgumentException("function is not polynomial");
         }
 
         // check for zeros before verifying bracketing

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/NewtonSolver.java Sat Feb 21 20:01:14 2009
@@ -132,8 +132,7 @@
 
             throw new MaxIterationsExceededException(maximalIterationCount);
         } catch (ClassCastException cce) {
-            throw MathRuntimeException.createIllegalArgumentException("function is not differentiable",
-                                                                      null);
+            throw MathRuntimeException.createIllegalArgumentException("function is not differentiable");
         }
     }
     

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverImpl.java Sat Feb 21 20:01:14 2009
@@ -76,8 +76,7 @@
                                        final double defaultAbsoluteAccuracy) {
         super(defaultMaximalIterationCount, defaultAbsoluteAccuracy);
         if (f == null) {
-            throw MathRuntimeException.createIllegalArgumentException("function to solve cannot be null",
-                                                                      null);
+            throw MathRuntimeException.createIllegalArgumentException("function to solve cannot be null");
         }
         this.f = f;
         this.defaultFunctionValueAccuracy = 1.0e-15;
@@ -104,7 +103,7 @@
      */
     protected void checkResultComputed() throws IllegalStateException {
         if (!resultComputed) {
-            throw MathRuntimeException.createIllegalStateException("no result available", null);
+            throw MathRuntimeException.createIllegalStateException("no result available");
         }
     }
 
@@ -212,7 +211,7 @@
         if (lower >= upper) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "endpoints do not specify an interval: [{0}, {1}]",
-                    new Object[] { lower, upper });
+                    lower, upper);
         }       
     }
     
@@ -229,7 +228,7 @@
         if (!isSequence(lower, initial, upper)) {
             throw MathRuntimeException.createIllegalArgumentException(
                     "invalid interval, initial value parameters:  lower={0}, initial={1}, upper={2}",
-                    new Object[] { lower, initial, upper });
+                    lower, initial, upper);
         }       
     }
     
@@ -253,7 +252,7 @@
             throw MathRuntimeException.createIllegalArgumentException(
                     "function values at endpoints do not have different signs.  " +
                     "Endpoints: [{0}, {1}], Values: [{2}, {3}]",
-                    new Object[] { lower, upper, f.value(lower), f.value(upper) });       
+                    lower, upper, f.value(lower), f.value(upper));       
         }
     }
 }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/analysis/solvers/UnivariateRealSolverUtils.java Sat Feb 21 20:01:14 2009
@@ -200,9 +200,7 @@
         if (fa * fb >= 0.0 ) {
             throw new ConvergenceException
             ("Number of iterations={0}, maximum iterations={1}, initial={2}, lower bound={3}, upper bound={4}, final a value={5}, final b value={6}, f(a)={7}, f(b)={8}",
-             new Object[] { Integer.valueOf(numIterations), Integer.valueOf(maximumIterations),
-                            Double.valueOf(initial), Double.valueOf(lowerBound), Double.valueOf(upperBound),
-                            Double.valueOf(a), Double.valueOf(b), Double.valueOf(fa), Double.valueOf(fb) });
+             numIterations, maximumIterations, initial, lowerBound, upperBound, a, b, fa, fb);
         }
         
         return new double[]{a, b};

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/complex/Complex.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/Complex.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/complex/Complex.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/complex/Complex.java Sat Feb 21 20:01:14 2009
@@ -905,8 +905,9 @@
     public List<Complex> nthRoot(int n) throws IllegalArgumentException {
 
         if (n <= 0) {
-            throw MathRuntimeException.createIllegalArgumentException("cannot compute nth root for null or negative n: {0}",
-                    new Object[] { n });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "cannot compute nth root for null or negative n: {0}",
+                    n);
         }
         
         List<Complex> result = new ArrayList<Complex>();

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/complex/ComplexFormat.java Sat Feb 21 20:01:14 2009
@@ -251,9 +251,9 @@
         ParsePosition parsePosition = new ParsePosition(0);
         Complex result = parse(source, parsePosition);
         if (parsePosition.getIndex() == 0) {
-            throw MathRuntimeException.createParseException("unparseable complex number: \"{0}\"",
-                                                            new Object[] { source },
-                                                            parsePosition.getErrorIndex());
+            throw MathRuntimeException.createParseException(
+                    parsePosition.getErrorIndex(),
+                    "unparseable complex number: \"{0}\"", source);
         }
         return result;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/AbstractContinuousDistribution.java Sat Feb 21 20:01:14 2009
@@ -71,7 +71,7 @@
                 try {
                     return cumulativeProbability(x) - p;
                 } catch (MathException ex) {
-                    throw new FunctionEvaluationException(x, ex.getPattern(), ex.getArguments(), ex);
+                    throw new FunctionEvaluationException(ex, x, ex.getPattern(), ex.getArguments());
                 }
             }
         };

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/BetaDistributionImpl.java Sat Feb 21 20:01:14 2009
@@ -98,12 +98,12 @@
             return 0;
         } else if (x == 0) {
             if (alpha < 1) {
-                throw new MathException("Cannot compute beta density at 0 when alpha = {0,number}", new Double[]{alpha});
+                throw new MathException("Cannot compute beta density at 0 when alpha = {0,number}", alpha);
             }
             return 0;
         } else if (x == 1) {
             if (beta < 1) {
-                throw new MathException("Cannot compute beta density at 1 when beta = %.3g", new Double[]{beta});
+                throw new MathException("Cannot compute beta density at 1 when beta = %.3g", beta);
             }
             return 0;
         } else {

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/distribution/ZipfDistributionImpl.java Sat Feb 21 20:01:14 2009
@@ -73,9 +73,9 @@
     public void setNumberOfElements(final int n)
         throws IllegalArgumentException {
         if (n <= 0) {
-            throw MathRuntimeException.createIllegalArgumentException("invalid number of elements {0}" +
-                                                                      " (must be positive)",
-                                                                      new Object[] { n });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "invalid number of elements {0} (must be positive)",
+                    n);
         }
         this.numberOfElements = n;
     }
@@ -100,8 +100,9 @@
     public void setExponent(final double s)
         throws IllegalArgumentException {
         if (s <= 0.0) {
-            throw MathRuntimeException.createIllegalArgumentException("invalid exponent {0} (must be positive)",
-                                                                      new Object[] { s });
+            throw MathRuntimeException.createIllegalArgumentException(
+                    "invalid exponent {0} (must be positive)",
+                    s);
         }
         this.exponent = s;
     }

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/AbstractEstimator.java Sat Feb 21 20:01:14 2009
@@ -106,7 +106,7 @@
 
         if (++costEvaluations > maxCostEval) {
             throw new EstimationException("maximal number of evaluations exceeded ({0})",
-                                          new Object[] { Integer.valueOf(maxCostEval) });
+                                          maxCostEval);
         }
 
         cost = 0;
@@ -191,8 +191,7 @@
                 new LUDecompositionImpl(MatrixUtils.createRealMatrix(jTj)).getSolver().getInverse();
             return inverse.getData();
         } catch (InvalidMatrixException ime) {
-            throw new EstimationException("unable to compute covariances: singular problem",
-                                          null);
+            throw new EstimationException("unable to compute covariances: singular problem");
         }
 
     }
@@ -211,8 +210,9 @@
         int m = problem.getMeasurements().length;
         int p = problem.getUnboundParameters().length;
         if (m <= p) {
-            throw new EstimationException("no degrees of freedom ({0} measurements, {1} parameters)",
-                                          new Object[] { Integer.valueOf(m), Integer.valueOf(p)});
+            throw new EstimationException(
+                    "no degrees of freedom ({0} measurements, {1} parameters)",
+                    m, p);
         }
         double[] errors = new double[problem.getUnboundParameters().length];
         final double c = Math.sqrt(getChiSquare(problem) / (m - p));

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/EstimationException.java Sat Feb 21 20:01:14 2009
@@ -39,7 +39,7 @@
      * @param specifier format specifier (to be translated)
      * @param parts to insert in the format (no translation)
      */
-    public EstimationException(String specifier, Object[] parts) {
+    public EstimationException(String specifier, Object ... parts) {
         super(specifier, parts);
     }
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/GaussNewtonEstimator.java Sat Feb 21 20:01:14 2009
@@ -210,7 +210,7 @@
                 }
 
             } catch(InvalidMatrixException e) {
-                throw new EstimationException("unable to solve: singular problem", null);
+                throw new EstimationException("unable to solve: singular problem");
             }
 
 

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/estimation/LevenbergMarquardtEstimator.java Sat Feb 21 20:01:14 2009
@@ -400,16 +400,16 @@
           throw new EstimationException("cost relative tolerance is too small ({0})," +
                                         " no further reduction in the" +
                                         " sum of squares is possible",
-                                        new Object[] { Double.valueOf(costRelativeTolerance) });
+                                        costRelativeTolerance);
         } else if (delta <= 2.2204e-16 * xNorm) {
           throw new EstimationException("parameters relative tolerance is too small" +
                                         " ({0}), no further improvement in" +
                                         " the approximate solution is possible",
-                                        new Object[] { Double.valueOf(parRelativeTolerance) });
+                                        parRelativeTolerance);
         } else if (maxCosine <= 2.2204e-16)  {
           throw new EstimationException("orthogonality tolerance is too small ({0})," +
                                         " solution is orthogonal to the jacobian",
-                                        new Object[] { Double.valueOf(orthoTolerance) });
+                                        orthoTolerance);
         }
 
       }
@@ -761,8 +761,9 @@
           norm2 += aki * aki;
         }
         if (Double.isInfinite(norm2) || Double.isNaN(norm2)) {
-            throw new EstimationException("unable to perform Q.R decomposition on the {0}x{1} jacobian matrix",
-                                          new Object[] { Integer.valueOf(rows), Integer.valueOf(cols) });
+            throw new EstimationException(
+                    "unable to perform Q.R decomposition on the {0}x{1} jacobian matrix",
+                    rows, cols);
         }
         if (norm2 > ak2) {
           nextColumn = i;

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/Fraction.java Sat Feb 21 20:01:14 2009
@@ -209,12 +209,12 @@
         super();
         if (den == 0) {
             throw MathRuntimeException.createArithmeticException("zero denominator in fraction {0}/{1}",
-                                                                 new Object[] { num, den});
+                                                                 num, den);
         }
         if (den < 0) {
             if (num == Integer.MIN_VALUE || den == Integer.MIN_VALUE) {
                 throw MathRuntimeException.createArithmeticException("overflow in fraction {0}/{1}, cannot negate",
-                                                                     new Object[] { num, den});
+                                                                     num, den);
             }
             num = -num;
             den = -den;
@@ -371,7 +371,7 @@
     public Fraction negate() {
         if (numerator==Integer.MIN_VALUE) {
             throw MathRuntimeException.createArithmeticException("overflow in fraction {0}/{1}, cannot negate",
-                                                                 new Object[] { numerator, denominator});
+                                                                 numerator, denominator);
         }
         return new Fraction(-numerator, denominator);
     }
@@ -462,7 +462,7 @@
         BigInteger w = t.divide(BigInteger.valueOf(d2));
         if (w.bitLength() > 31) {
             throw MathRuntimeException.createArithmeticException("overflow, numerator too large after multiply: {0}",
-                                                                 new Object[] { w });
+                                                                 w);
         }
         return new Fraction (w.intValue(), 
                 MathUtils.mulAndCheck(denominator/d1, 
@@ -510,8 +510,9 @@
             throw new IllegalArgumentException("The fraction must not be null");
         }
         if (fraction.numerator == 0) {
-            throw MathRuntimeException.createArithmeticException("the fraction to divide by must not be zero: {0}/{1}",
-                                                                 new Object[] { fraction.numerator, fraction.denominator });
+            throw MathRuntimeException.createArithmeticException(
+                    "the fraction to divide by must not be zero: {0}/{1}",
+                    fraction.numerator, fraction.denominator);
         }
         return multiply(fraction.reciprocal());
     }
@@ -529,8 +530,9 @@
      */
     public static Fraction getReducedFraction(int numerator, int denominator) {
         if (denominator == 0) {
-            throw MathRuntimeException.createArithmeticException("zero denominator in fraction {0}/{1}",
-                                                                 new Object[] { numerator, denominator});
+            throw MathRuntimeException.createArithmeticException(
+                    "zero denominator in fraction {0}/{1}",
+                    numerator, denominator);
         }
         if (numerator==0) {
             return ZERO; // normalize zero.
@@ -542,8 +544,9 @@
         if (denominator < 0) {
             if (numerator==Integer.MIN_VALUE ||
                     denominator==Integer.MIN_VALUE) {
-                throw MathRuntimeException.createArithmeticException("overflow in fraction {0}/{1}, cannot negate",
-                                                                     new Object[] { numerator, denominator});
+                throw MathRuntimeException.createArithmeticException(
+                        "overflow in fraction {0}/{1}, cannot negate",
+                        numerator, denominator);
             }
             numerator = -numerator;
             denominator = -denominator;

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionConversionException.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionConversionException.java?rev=746578&r1=746577&r2=746578&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionConversionException.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/fraction/FractionConversionException.java Sat Feb 21 20:01:14 2009
@@ -38,8 +38,7 @@
      * @param maxIterations maximal number of iterations allowed
      */
     public FractionConversionException(double value, int maxIterations) {
-        super("Unable to convert {0} to fraction after {1} iterations",
-              new Object[] { Double.valueOf(value), Integer.valueOf(maxIterations) });
+        super("Unable to convert {0} to fraction after {1} iterations", value, maxIterations);
     }
 
     /**
@@ -50,8 +49,7 @@
      * @param q current denominator
      */
     public FractionConversionException(double value, long p, long q) {
-        super("Overflow trying to convert {0} to fraction ({1}/{2})",
-              new Object[] { Double.valueOf(value), Long.valueOf(p), Long.valueOf(q) });
+        super("Overflow trying to convert {0} to fraction ({1}/{2})", value, p, q);
     }
 
 }