commons-commits mailing list archives

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

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

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

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java?rev=1198656&r1=1198655&r2=1198656&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java
(original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/enhance/ExpressionCompiler.java
Mon Nov  7 09:09:47 2011
@@ -247,7 +247,7 @@ public class ExpressionCompiler
      */
     public String getClassName( Class<?> clazz )
     {
-        if ( clazz.getName().equals( "java.util.AbstractList$Itr" ) )
+        if ( "java.util.AbstractList$Itr".equals( clazz.getName() ) )
         {
             return Iterator.class.getName();
         }
@@ -410,7 +410,7 @@ public class ExpressionCompiler
      */
     public Class<?> getInterfaceClass( Class<?> clazz )
     {
-        if ( clazz.getName().equals( "java.util.AbstractList$Itr" ) )
+        if ( "java.util.AbstractList$Itr".equals( clazz.getName() ) )
         {
             return Iterator.class;
         }
@@ -616,7 +616,7 @@ public class ExpressionCompiler
             post = post + ")";
         }
 
-        String rootExpr = !getterCode.equals( "null" ) ? getRootExpression( expression, root,
context ) : "";
+        String rootExpr = !"null".equals( getterCode ) ? getRootExpression( expression, root,
context ) : "";
 
         String noRoot = (String) context.remove( "_noRoot" );
         if ( noRoot != null )



Mime
View raw message