harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r772994 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
Date Fri, 08 May 2009 14:02:39 GMT
Author: tellison
Date: Fri May  8 14:02:38 2009
New Revision: 772994

URL: http://svn.apache.org/viewvc?rev=772994&view=rev
Log:
More tweaks to the specialization of lessThan for floats and doubles.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java?rev=772994&r1=772993&r2=772994&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Arrays.java Fri May
 8 14:02:38 2009
@@ -1565,7 +1565,10 @@
         if (double1 < double2) {
             return true;
         }
-        if (double1 >= double2 && (0.0d != double1 || 0.0d != double2)) {
+        if (double1 > double2) {
+            return false;
+        }
+        if (double1 == double2 && 0.0d != double1) {
             return false;
         }
 
@@ -1589,7 +1592,10 @@
         if (float1 < float2) {
             return true;
         }
-        if (float1 >= float2 && (0.0f != float1 || 0.0f != float2)) {
+        if (float1 > float2) {
+            return false;
+        }
+        if (float1 == float2 && 0.0f != float1) {
             return false;
         }
 



Mime
View raw message