Hola Mau!
> URL: http://svn.apache.org/viewvc?rev=1197452&view=rev
> Log:
> OGNL-35 - Flipped equals() everywhere where a variable is tested against a
> String constant.
>
This is IMHO a very good improvement, expected values first in assertions!
> @@ -168,19 +169,19 @@ public class MapPropertyAccessor
> {
> String key = indexStr.replaceAll( "\"", "" );
>
> - if ( key.equals( "size" ) )
> + if ( "size".equals( key ) )
> {
> return "";
> }
> - else if ( key.equals( "keys" ) || key.equals( "keySet" ) )
> + else if ( "keys".equals( key ) || "keySet".equals( key ) )
> {
> return "";
> }
> - else if ( key.equals( "values" ) )
> + else if ( "values".equals( key ) )
> {
> return "";
> }
> - else if ( key.equals( "isEmpty" ) )
> + else if ( "isEmpty".equals( key ) )
> {
> return "";
> }
>
Can we group all these conditions in just one, since they all return
an empty string?
TIA, have a nice day!
Simo
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/