You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/07/08 15:07:06 UTC

DO NOT REPLY [Bug 28684] - BigDecimalLocaleConverter seems not working as designed

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28684>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28684

BigDecimalLocaleConverter seems not working as designed





------- Additional Comments From niallp@apache.org  2004-07-08 13:07 -------
BigDecimalLocaleConverter, BigIntegerLocaleConverter, LongLocaleConverter and 
ShortLocaleConverter all just pass back the results of the DecimalFormat.parse
() method, which either returns a Double or Long value.

I'm going to fix these so that they convert the Number returned by the 
DecimalFormat.parse() method to the appropriate type. There were no unit tests 
for these classes, so I have also added TestCases for all the locale numeric 
converters.

While I was testing I also found a bug in the constructor with the following 
method signiture which meant that the locPattern boolean argument was not being 
set. This bug was in the BigDecimalLocaleConverter, BigIntegerLocaleConverter, 
ByteLocaleConverter, DoubleLocaleConverter, FloatLocaleConverter and 
ShortLocaleConverter classes and I will also fix this.

public BigDecimalLocaleConverter(Object defaultValue, Locale locale, String 
pattern, boolean locPattern)

Niall

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