From 5a589042b9e1bf186618bedba4cc8254187b0d66 Mon Sep 17 00:00:00 2001 From: William Barker Date: Wed, 28 Jan 2009 05:20:31 +0000 Subject: [PATCH] Correct bug that prevents replacing an element while using an iterator git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@738370 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/math/util/OpenIntToDoubleHashMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java b/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java index adb1060bb..60b60bb4f 100644 --- a/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java +++ b/src/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java @@ -340,6 +340,7 @@ public class OpenIntToDoubleHashMap implements Serializable { return size; } + /** * Remove the value associated with a key. * @param key key to which the value is associated @@ -418,9 +419,8 @@ public class OpenIntToDoubleHashMap implements Serializable { if (shouldGrowTable()) { growTable(); } + ++count; } - - ++count; return previous; }