commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r738370 - /commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
Date Wed, 28 Jan 2009 05:20:32 GMT
Author: billbarker
Date: Wed Jan 28 05:20:31 2009
New Revision: 738370

URL: http://svn.apache.org/viewvc?rev=738370&view=rev
Log:
Correct bug that prevents replacing an element while using an iterator

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

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java?rev=738370&r1=738369&r2=738370&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
Wed Jan 28 05:20:31 2009
@@ -340,6 +340,7 @@
         return size;
     }
 
+    
     /**
      * Remove the value associated with a key.
      * @param key key to which the value is associated
@@ -418,9 +419,8 @@
             if (shouldGrowTable()) {
                 growTable();
             }
+            ++count;
         }
-
-        ++count;
         return previous;
 
     }



Mime
View raw message