You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2007/05/20 07:45:56 UTC

svn commit: r539829 - /jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java

Author: psteitz
Date: Sat May 19 22:45:54 2007
New Revision: 539829

URL: http://svn.apache.org/viewvc?view=rev&rev=539829
Log:
eliminated unnecessary Double creation.

Modified:
    jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java

Modified: jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java?view=diff&rev=539829&r1=539828&r2=539829
==============================================================================
--- jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java (original)
+++ jakarta/commons/proper/math/trunk/src/java/org/apache/commons/math/util/MathUtils.java Sat May 19 22:45:54 2007
@@ -558,7 +558,7 @@
     public static double round(double x, int scale, int roundingMethod) {
         try {
             return (new BigDecimal
-                   (new Double(x).toString())
+                   (Double.toString(x))
                    .setScale(scale, roundingMethod))
                    .doubleValue();
         } catch (NumberFormatException ex) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org