You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2008/06/18 15:21:02 UTC

svn commit: r669164 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java

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;