[ 
https://issues.apache.org/jira/browse/WICKET-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-3385.
-------------------------------------

    Resolution: Won't Fix
      Assignee: Martin Grigorov

This doesn't work like described in the ticket description.
NumberFormat#parseObject(String, ParsePosition) is used to parse the number. It 
returns either Double or Long depending on whether the passed String parameter 
has decimal separator. Later the correct type is converted with 
Number#***Value()

> org.apache.wicket.util.convert.converter.BigDecimalConverter parse method 
> returns BigDecimal
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3385
>                 URL: https://issues.apache.org/jira/browse/WICKET-3385
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5-RC1
>         Environment: all
>            Reporter: Richard Emberson
>            Assignee: Martin Grigorov
>            Priority: Trivial
>
> if
> BigDecimalConverter parametrizes AbstractDecimalConverter with BigDecimal
> then
> AbstractDecimalConverter parametrizes  AbstractNumberConverter with BigDecimal
> and then
> AbstractNumberConverter parametrizes  AbstractConverter with BigDecimal
> which means that AbstractNumberConverter parse method returns a BigDecimal
> so that in BigDecimalConverter convertToObject method
> the line:
>  final Number number = parse(value, -Double.MAX_VALUE, Double.MAX_VALUE, 
> locale);
> should be:
>  final BigDecimal bigDecimal = parse(value, -Double.MAX_VALUE, 
> Double.MAX_VALUE, locale);
> and all the code that follows that line can be replaced with:
>  return bigDecimal;

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to