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 2005/10/04 09:32:04 UTC
DO NOT REPLY [Bug 36878] -
GenericTypeValidator does not accept negative Floats/Doubles
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=36878>.
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=36878
niallp@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From niallp@apache.org 2005-10-04 09:32 -------
(In reply to comment #0)
> There's a bug in the validation code of formatFloat:
> ---snip---
> if (num.doubleValue() >= (Float.MIN_VALUE * -1) &&
> num.doubleValue() <= Float.MAX_VALUE) {
> result = new Float(num.floatValue());
> }
> ---snip---
Thanks for pointing this out - should have been (Float.MAX_VALUE * -1):
http://issues.apache.org/bugzilla/show_bug.cgi?id=21282#c16
I have fixed both the formatFloat and formatDouble methods.
> There's also an issue with the delimiter which is used to mark powers of 10^3:
> With Locale.US the following is accepted:
> 2.5 This is ok
> 2,500.0 This is ok
> 2,5.0 This is transformed into 25.0
The delimiter for powers of 10 is "E" regardless of locale. So using 1,250 as
an example:
For US locale 1.25E3 should be transformed to 1250
For GERMAN locale 1,25E3 should be transformed to 1250
Closing this as *FIXED*.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org