|
From: Jan H. (JIRA) <no...@sp...> - 2008-02-21 09:52:25
|
[ http://jira.springframework.org/browse/RCP-539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Hoskens closed RCP-539.
---------------------------
Assignee: Jan Hoskens
Resolution: Fixed
Fix Version/s: 1.0.0
Fixed in:
http://spring-rich-c.svn.sourceforge.net/spring-rich-c/?rev=1971&view=rev
& added some testcases for BigDecimal.
> BigDecimalTextField looses precision when value is set
> ------------------------------------------------------
>
> Key: RCP-539
> URL: http://jira.springframework.org/browse/RCP-539
> Project: Spring Framework Rich Client Project
> Issue Type: Bug
> Components: Binding System
> Affects Versions: 0.2.1
> Reporter: Johannes Bergmann
> Assignee: Jan Hoskens
> Fix For: 1.0.0
>
>
> Method setValue in BigDecimalTextField converts the number to a double value before passing it to the format:
> public void setValue(Number number) {
> String txt = null;
> if (number != null) {
> txt = this.format.format(number.doubleValue());
> }
> setText(txt);
> }
> If number is a BigDecimal the precision of this value might be lost.
> Example: new BigDecimal("1234567890123456.7") is displayed as 1234567890123456.7
> Supposed solution:
> Pass number instance directly to the format method:
> txt = this.format.format(number);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.springframework.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|