Hmm, yes, I think so.

It should be "return Double.valueOf((String)valueObject).doubleValue()"

But I'm not sure, what happens with the conversion of NaN in a primitive double 
value...

T.

> -----Ursprüngliche Nachricht-----
> Von: Jonathan Purvis [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 19. April 2006 06:32
> An: torque-dev@db.apache.org
> Betreff: [village] Value.asDouble uses Integer.valueOf to 
> parse strings
> 
> 
> I got this exception from Village:
> 
> Caused by: com.workingdogs.village.DataSetException: Bad conversion:
> java.lang.NumberFormatException: For input string: "NaN"
>       at com.workingdogs.village.Value.asDouble(Value.java:1046)
> 
> It didn't make any sense to me, so i looked at the source 
> code and the Value.asDouble method really does say:
>             else if (isString())
>             {
>                 return Integer.valueOf((String) 
> valueObject).doubleValue();
>             }
> 
> (As found at
> <http://svn.softwareforge.de/svn/opensource/village/trunk/src/
java/com/workingdogs/village/Value.java>)

Is there a reason for this or is it just a copy'n'paste bug?


Regards,

       Jon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to