commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1206655 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Date Sun, 27 Nov 2011 02:23:39 GMT
Author: sebb
Date: Sun Nov 27 02:23:39 2011
New Revision: 1206655

URL: http://svn.apache.org/viewvc?rev=1206655&view=rev
Log:
Unnecessary casts (parameters already of correct type)

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java?rev=1206655&r1=1206654&r2=1206655&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Sun
Nov 27 02:23:39 2011
@@ -209,7 +209,7 @@ public final class MathUtils {
                    magnitude == Integer.MIN_VALUE) {
             throw new MathArithmeticException(LocalizedFormats.OVERFLOW);
         } else {
-            return (int) -magnitude; // Flip sign.
+            return -magnitude; // Flip sign.
         }
     }
 
@@ -231,7 +231,7 @@ public final class MathUtils {
                    magnitude == Long.MIN_VALUE) {
             throw new MathArithmeticException(LocalizedFormats.OVERFLOW);
         } else {
-            return (long) -magnitude; // Flip sign.
+            return -magnitude; // Flip sign.
         }
     }
 



Mime
View raw message