On 19/01/2010, at 9:36 PM, [email protected] wrote:

> Author: adrianc
> Date: Wed Jan 20 04:36:42 2010
> New Revision: 901058
> 
> URL: http://svn.apache.org/viewvc?rev=901058&view=rev
> Log:
> Simplified the number converters. Eliminated an unnecessary abstract class, 
> made use of Java's auto-boxing. Non-localized Number to String conversions 
> use the the toString() method - so the result is what you would expect.
> 
> -    public static class BigDecimalToString extends 
> AbstractUsesLocaleConverter<BigDecimal, String> {
> +    public static class BigDecimalToString extends 
> AbstractToNumberConverter<BigDecimal, String> {
>        public BigDecimalToString() {
>            super(BigDecimal.class, String.class);
>        }
> 
> +        public String convert(BigDecimal obj) throws ConversionException {
> +            return obj.toString();
> +        }
> +


Hi Adrian,

bigDecimal.toString() can return scientific notation in some cases, it's 
usually better to use bigDecimal.toPlainString()
http://java.sun.com/javase/6/docs/api/java/math/BigDecimal.html#toString()

Regards
Scott

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to