commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1198664 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java
Date Mon, 07 Nov 2011 09:15:09 GMT
Author: mcucchiara
Date: Mon Nov  7 09:15:09 2011
New Revision: 1198664

URL: http://svn.apache.org/viewvc?rev=1198664&view=rev
Log:
OGNL-38 - Test CONSTANT.equals(variable).

Modified:
    commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java?rev=1198664&r1=1198663&r2=1198664&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java
(original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/EnumerationPropertyAccessor.java
Mon Nov  7 09:15:09 2011
@@ -42,13 +42,13 @@ public class EnumerationPropertyAccessor
 
         if ( name instanceof String )
         {
-            if ( name.equals( "next" ) || name.equals( "nextElement" ) )
+            if ( "next".equals( name ) || "nextElement".equals( name ) )
             {
                 result = e.nextElement();
             }
             else
             {
-                if ( name.equals( "hasNext" ) || name.equals( "hasMoreElements" ) )
+                if ( "hasNext".equals( name ) || "hasMoreElements".equals( name ) )
                 {
                     result = e.hasMoreElements() ? Boolean.TRUE : Boolean.FALSE;
                 }



Mime
View raw message