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, ...
Ok, I thought you were trying to point out some bug that I wasn't getting.
You're talking about general style. I'll take care of it.
>
>
>>
>> > 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
>>
>>
>
>