commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1174009 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java
Date Thu, 22 Sep 2011 09:18:14 GMT
Author: erans
Date: Thu Sep 22 09:18:14 2011
New Revision: 1174009

URL: http://svn.apache.org/viewvc?rev=1174009&view=rev
Log:
Spurious space character.
Unnecessary cast.

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=1174009&r1=1174008&r2=1174009&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/MathUtils.java Thu
Sep 22 09:18:14 2011
@@ -2006,8 +2006,8 @@ public final class MathUtils {
      * @param strict Whether the order should be strict.
      * @return {@code true} if sorted, {@code false} otherwise
      */
-    public static boolean isMonotone( double[] val, OrderDirection dir,
-                                      boolean strict){
+    public static boolean isMonotone(double[] val, OrderDirection dir,
+                                     boolean strict){
         double previous = val[0];
         int max = val.length;
         for (int i = 1; i < max; i++) {
@@ -2065,14 +2065,14 @@ public final class MathUtils {
                 if (strict) {
                     if (val[i] <= previous) {
                         if (abort) {
-                            throw new NonMonotonousSequenceException((Number)val[i], (Number)previous,
i, dir, strict);
+                            throw new NonMonotonousSequenceException(val[i], previous, i,
dir, strict);
                         }
                         return false;
                     }
                 } else {
                     if (val[i] < previous) {
                         if (abort) {
-                            throw new NonMonotonousSequenceException((Number)val[i], (Number)previous,
i, dir, strict);
+                            throw new NonMonotonousSequenceException(val[i], previous, i,
dir, strict);
                         }
                         return false;
                     }
@@ -2082,14 +2082,14 @@ public final class MathUtils {
                 if (strict) {
                     if (val[i] >= previous) {
                         if (abort) {
-                            throw new NonMonotonousSequenceException((Number)val[i], (Number)previous,
i, dir, strict);
+                            throw new NonMonotonousSequenceException(val[i], previous, i,
dir, strict);
                         }
                         return false;
                     }
                 } else {
                     if (val[i] > previous) {
                         if (abort) {
-                            throw new NonMonotonousSequenceException((Number)val[i], (Number)previous,
i, dir, strict);
+                            throw new NonMonotonousSequenceException(val[i], previous, i,
dir, strict);
                         }
                         return false;
                     }



Mime
View raw message