commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1104508 - /incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
Date Tue, 17 May 2011 20:03:39 GMT
Author: simonetripodi
Date: Tue May 17 20:03:39 2011
New Revision: 1104508

URL: http://svn.apache.org/viewvc?rev=1104508&view=rev
Log:
used expected value first when comparing keys

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

Modified: incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java?rev=1104508&r1=1104507&r2=1104508&view=diff
==============================================================================
--- incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
(original)
+++ incubator/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/ClassCacheImpl.java
Tue May 17 20:03:39 2011
@@ -89,7 +89,7 @@ public class ClassCacheImpl
 
         while ( entry != null )
         {
-            if ( entry.getKey() == key )
+            if ( key == entry.getKey() )
             {
                 result = entry.getValue();
                 break;
@@ -124,7 +124,7 @@ public class ClassCacheImpl
         }
         else
         {
-            if ( entry.getKey() == key )
+            if ( key == entry.getKey() )
             {
                 result = entry.getValue();
                 entry.setValue( value );
@@ -133,7 +133,7 @@ public class ClassCacheImpl
             {
                 while ( true )
                 {
-                    if ( entry.getKey() == key )
+                    if ( key == entry.getKey() )
                     {
                         /* replace value */
                         result = entry.getValue();



Mime
View raw message