commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/util Coercion.java
Date Fri, 17 May 2002 12:23:22 GMT
geirm       02/05/17 05:23:22

  Modified:    jexl/src/java/org/apache/commons/jexl/util Coercion.java
  Log:
  I think we are leaving the reservation spec-wise, but this makes perfect
  sense
  
  Revision  Changes    Path
  1.2       +10 -2     jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/util/Coercion.java
  
  Index: Coercion.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jexl/src/java/org/apache/commons/jexl/util/Coercion.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Coercion.java	26 Apr 2002 04:23:17 -0000	1.1
  +++ Coercion.java	17 May 2002 12:23:22 -0000	1.2
  @@ -147,9 +147,17 @@
           {
               return new Double(0);
           }
  -        else if (val instanceof String && ((String)val).equals(""))
  +        else if (val instanceof String)
           {
  -            return new Double(0);
  +            if(((String)val).equals(""))
  +                return new Double(0);
  +
  +            /*
  +             * the spec seems to be iffy about this.  Going to give it a wack
  +             *  anyway
  +             */
  +
  +            return new Double((String) val);
           }
           else if(val instanceof Character)
           {
  
  
  

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


Mime
View raw message