commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1126159 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java
Date Sun, 22 May 2011 19:04:02 GMT
Author: simonetripodi
Date: Sun May 22 19:04:02 2011
New Revision: 1126159

URL: http://svn.apache.org/viewvc?rev=1126159&view=rev
Log:
expected values always first when comparing values

Modified:
    incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java?rev=1126159&r1=1126158&r2=1126159&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java (original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java Sun May 22
19:04:02 2011
@@ -240,7 +240,7 @@ public class IntHashMap<K extends Number
 
         for ( Entry<V> e = table[index]; e != null; e = e.next )
         {
-            if ( ( e.getHash() == key ) && ( e.getKey() == key ) )
+            if ( ( key == e.getHash() ) && ( key == e.getKey() ) )
             {
                 return true;
             }
@@ -254,7 +254,7 @@ public class IntHashMap<K extends Number
 
         for ( Entry<V> e = table[index]; e != null; e = e.getNext() )
         {
-            if ( ( e.getHash() == key ) && ( e.getKey() == key ) )
+            if ( ( key == e.getHash() ) && ( key == e.getKey() ) )
             {
                 return e.getValue();
             }
@@ -272,7 +272,7 @@ public class IntHashMap<K extends Number
         }
         for ( Entry<V> e = table[index]; e != null; e = e.next )
         {
-            if ( ( e.getHash() == key ) && ( e.getKey() == key ) )
+            if ( ( key == e.getHash() ) && ( key == e.getKey() ) )
             {
                 V old = e.getValue();
 
@@ -302,7 +302,7 @@ public class IntHashMap<K extends Number
 
         for ( Entry<V> e = table[index], prev = null; e != null; prev = e, e = e.next
)
         {
-            if ( ( e.getHash() == key ) && ( e.getKey() == key ) )
+            if ( ( key == e.getHash() ) && ( key == e.getKey() ) )
             {
                 if ( prev != null )
                 {



Mime
View raw message