dev@javaserverfaces.java.net

Re: [API] Converter(s).getAsString()

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Fri, 18 May 2007 09:23:40 -0700

FIXED.

Matthias Wessendorf wrote:
>> The above looks wrong.
>
> :-)
> Yes, I used the code of Float.
>
>> The RI, in the case of the DoubleConverter does:
>>
>> return (Double.toString(((Double) value).doubleValue()));
>>
>>
>> It seems reasonable to me to expect the Object to be Double as that
>> is what this converter deals with.
>
> Well, the minimal contract is Number and the doubleValue() (and
> floatValue(),...) are defined in that. So using Number wouldn't heart.
>
> I use the attached Converter in the Renderer to *convert* some other
> "numbers", based on the underlying Converter (and it's rules). The
> type of these numbers is java.lang.Number to support Double, Long, ...
>
>
>>
>> > MyFaces does:
>> > try
>> > {
>> > return Double.toString(((Number)value).doubleValue());
>> > }
>> >
>> > Shouldn't the RI use Number as well ?
>> >
>> > -Matthias
>> >
>> >
>> http://fisheye5.cenqua.com/browse/~raw,r=1.21/javaserverfaces-sources/jsf-api/src/javax/faces/convert/DoubleConverter.java
>>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>>
>
>