commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/expression ExpressionSupport.java
Date Sun, 05 Sep 2004 11:35:45 GMT
dion        2004/09/05 04:35:45

  Modified:    jelly/src/java/org/apache/commons/jelly/expression
                        ExpressionSupport.java
  Log:
  Simplify code
  
  Revision  Changes    Path
  1.14      +4 -11     jakarta-commons/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java
  
  Index: ExpressionSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/expression/ExpressionSupport.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ExpressionSupport.java	31 Aug 2004 04:55:02 -0000	1.13
  +++ ExpressionSupport.java	5 Sep 2004 11:35:45 -0000	1.14
  @@ -77,20 +77,13 @@
               // return Boolean.getBoolean( (String) value );
               String str = (String) value;
   
  -            if ( str.equals( "on" )
  +            return ( str.equalsIgnoreCase( "on" )
                    ||
  -                 str.equals( "yes" )
  +                 str.equalsIgnoreCase( "yes" )
                    ||
                    str.equals( "1" )
                    ||
  -                 str.equals( "true" ) )
  -            {
  -                return true;
  -            }
  -            else
  -            {
  -                return false;
  -            }
  +                 str.equalsIgnoreCase( "true" ) );
   
           }
           return false;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message