harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r557922 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
Date Fri, 20 Jul 2007 08:21:30 GMT
Author: tellison
Date: Fri Jul 20 01:21:29 2007
New Revision: 557922

URL: http://svn.apache.org/viewvc?view=rev&rev=557922
Log:
Avoid underflow when calling Hashtable.elements().hasMoreElements() lots of times.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java?view=diff&rev=557922&r1=557921&r2=557922
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Hashtable.java Fri
Jul 20 01:21:29 2007
@@ -228,8 +228,8 @@
             if (entry != null) {
                 return true;
             }
-            while (--start >= firstSlot) {
-                if (elementData[start] != null) {
+            while (start > firstSlot) {
+                if (elementData[--start] != null) {
                     entry = elementData[start];
                     return true;
                 }



Mime
View raw message