harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r669164 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java
Date Wed, 18 Jun 2008 13:21:02 GMT
Author: tellison
Date: Wed Jun 18 06:21:01 2008
New Revision: 669164

URL: http://svn.apache.org/viewvc?rev=669164&view=rev
Log:
Remove redundant null check.
(see mail thread http://markmail.org/message/4poa7uvf4njrdnko)

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java?rev=669164&r1=669163&r2=669164&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java Wed
Jun 18 06:21:01 2008
@@ -679,13 +679,17 @@
         return null;
     }
 
+    /*
+     * Remove the given entry from the hashmap.
+     * Assumes that the entry is in the map.
+     */
     final void removeEntry(Entry<K, V> entry) {
         int index = entry.origKeyHash & (elementData.length - 1);
         Entry<K, V> m = elementData[index];
         if (m == entry) {
             elementData[index] = entry.next;
         } else {
-            while (m.next != entry && m.next != null) {
+            while (m.next != entry) {
                 m = m.next;
             }
             m.next = entry.next;



Mime
View raw message