Hi

Yeah we should cover all the NaN for the numeric types, both the
integers and the floating types.
I am sure Ben can add that last pieces for the floating types.


On Thu, May 26, 2011 at 1:31 PM, bvahdat <[email protected]> wrote:
> Hi,
>
> I think that not only Double.NaN should be catched but also Float.NaN.
>
> If you add the following lines in ObjectConverterTest the test will fail:
>
>        assertEquals(null, ObjectConverter.toFloat(Float.NaN));
>        assertEquals(null, ObjectConverter.toLong(Float.NaN));
>
> So that I think that ALL the following checks in ObjectConverter:
>
> ...
>            if (value.equals(Double.NaN)) {
>                return null;
>            }
> ...
>
> Should be changed extended to
>
> ...
>            if (value.equals(Float.NaN) || value.equals(Double.NaN)) {
>                return null;
>            }
> ...
>
> Or am I missing something?
>
> Regards, Babak
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/XPath-for-an-Integer-tp4422095p4428290.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to