harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r652448 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TreeMap.java
Date Thu, 01 May 2008 07:49:17 GMT
Author: hindessm
Date: Thu May  1 00:49:17 2008
New Revision: 652448

URL: http://svn.apache.org/viewvc?rev=652448&view=rev
Log:
Additional fix for the Treemap.subMap() for "[#HARMONY-5788] [classlib][util]
TreeMap.entrySet().contains() returns true for entries with null value".

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TreeMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TreeMap.java?rev=652448&r1=652447&r2=652448&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TreeMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/TreeMap.java Thu
May  1 00:49:17 2008
@@ -842,7 +842,7 @@
                 K key = entry.getKey();
                 if (subMap.isInRange(key)) {
                     V v1 = subMap.get(key), v2 = entry.getValue();
-                    return v1 == null ? v2 == null : v1.equals(v2);
+                    return v1 == null ? ( v2 == null && subMap.containsKey(key) )
: v1.equals(v2);
                 }
             }
             return false;



Mime
View raw message