You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/03/09 15:24:34 UTC

svn commit: r1454717 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java

Author: tn
Date: Sat Mar  9 14:24:34 2013
New Revision: 1454717

URL: http://svn.apache.org/r1454717
Log:
[COLLECTIONS-445] Clarify that the behavior of IBM JDK is not really a bug, Map.Entry specifies that its behavior is undefined if the backing map is modified.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java?rev=1454717&r1=1454716&r2=1454717&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java (original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/bidimap/DualTreeBidiMap.java Sat Mar  9 14:24:34 2013
@@ -363,8 +363,9 @@ public class DualTreeBidiMap<K, V> exten
                         "Cannot use setValue() when the object being set is already in the map");
             }
             final V oldValue = parent.put(last.getKey(), value);
-            // set also the value in the Map.Entry:
-            // due to a bug in IBM JDK where the Entry is not in sync with the underlying map
+            // Map.Entry specifies that the behavior is undefined when the backing map
+            // has been modified (as we did with the put), so we also set the value
+            // (especially needed for IBM JDK)
             last.setValue(value);
             return oldValue;
         }