Author: mcucchiara Date: Fri Nov 4 09:44:15 2011 New Revision: 1197462 URL: http://svn.apache.org/viewvc?rev=1197462&view=rev Log: Group conditions with same return value
Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java Modified: commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java?rev=1197462&r1=1197461&r2=1197462&view=diff ============================================================================== --- commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java (original) +++ commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/MapPropertyAccessor.java Fri Nov 4 09:44:15 2011 @@ -39,7 +39,7 @@ public class MapPropertyAccessor { Object result; @SuppressWarnings( "unchecked" ) // checked by the invoker - Map<Object, Object> map = (Map<Object, Object>) target; + Map<Object, Object> map = (Map<Object, Object>) target; Node currentNode = ( (OgnlContext) context ).getCurrentNode().jjtGetParent(); boolean indexedAccess = false; @@ -169,19 +169,8 @@ public class MapPropertyAccessor { String key = indexStr.replaceAll( "\"", "" ); - if ( "size".equals( key ) ) - { - return ""; - } - else if ( "keys".equals( key ) || "keySet".equals( key ) ) - { - return ""; - } - else if ( "values".equals( key ) ) - { - return ""; - } - else if ( "isEmpty".equals( key ) ) + if ( "size".equals( key ) || "keys".equals( key ) || "keySet".equals( key ) || "values".equals( key ) + || "isEmpty".equals( key ) ) { return ""; }