commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1188797 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
Date Tue, 25 Oct 2011 17:08:56 GMT
Author: mcucchiara
Date: Tue Oct 25 17:08:55 2011
New Revision: 1188797

URL: http://svn.apache.org/viewvc?rev=1188797&view=rev
Log:
If statement can be simplified

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

Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java
URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java?rev=1188797&r1=1188796&r2=1188797&view=diff
==============================================================================
--- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java (original)
+++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java Tue Oct
25 17:08:55 2011
@@ -2662,15 +2662,11 @@ public class OgnlRuntime
             return false;
         }
 
-        if ( "true".equals( expression ) || "false".equals( expression ) || "!true".equals(
expression )
+        return "true".equals( expression ) || "false".equals( expression ) || "!true".equals(
expression )
             || "!false".equals( expression ) || "(true)".equals( expression ) || "!(true)".equals(
expression )
             || "(false)".equals( expression ) || "!(false)".equals( expression ) || expression.startsWith(
-            "org.apache.commons.ognl.OgnlOps" ) )
-        {
-            return true;
-        }
+            "org.apache.commons.ognl.OgnlOps" );
 
-        return false;
     }
 
     /**



Mime
View raw message