You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Richard Emberson (JIRA)" <ji...@apache.org> on 2011/01/25 21:19:43 UTC
[jira] Commented: (WICKET-3385)
org.apache.wicket.util.convert.converter.BigDecimalConverter parse method
returns BigDecimal
[ https://issues.apache.org/jira/browse/WICKET-3385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986659#action_12986659 ]
Richard Emberson commented on WICKET-3385:
------------------------------------------
A number of the other numeric converters are similar and
their convertToObject method can be addressed.
> 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
> 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.
-
You can reply to this email to add a comment to the issue online.