harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r568967 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
Date Thu, 23 Aug 2007 13:25:08 GMT
Author: tellison
Date: Thu Aug 23 06:25:08 2007
New Revision: 568967

URL: http://svn.apache.org/viewvc?rev=568967&view=rev
Log:
Safer computation of average, although this would not overflow in practice.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java?rev=568967&r1=568966&r2=568967&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Character.java Thu
Aug 23 06:25:08 2007
@@ -1815,7 +1815,7 @@
             int mid = -1;
             int high = BLOCKS.length - 1;
             while (low <= high) {
-                mid = (low + high) >> 1;
+                mid = (low + high) >>> 1;
                 UnicodeBlock block = BLOCKS[mid];
                 if (codePoint > block.end) {
                     low = mid + 1;



Mime
View raw message