Bug 22694 - DecimalFormat misbehaviour
Summary: DecimalFormat misbehaviour
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-22 09:13 UTC by from-classpath
Modified: 2005-07-23 22:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description from-classpath 2003-08-22 09:13:30 UTC
* According to sun's spec, exponential format may have a fractional part.
* Minimum/Maximum digits function must update maximum/minimum fields accordingly. As this is done by super delegate the work to it.

This patch fixes this two issues.
Comment 1 from-classpath 2003-09-07 12:54:27 UTC
I created two new Mauve tests.

gnu/testlet/java/text/DecimalFormat/digits.java
Which shows that the Minimum/Maximum digits function weren't functioning correctly.

gnu/testlet/java/text/DecimalFormat/formatExp.java
Which tests some exponentional formats (and shows some errors even with this patch).
Comment 2 from-classpath 2003-09-09 21:19:48 UTC
Applied as:

2003-09-09  Guilhem Lavaux <guilhem@kaffe.org>

       * java/text/DecimalFormat.java (format): Don't immediatly round
       baseNumber to long.
       (setMinimumIntegerDigits): Call super.
       (setMinimumFractionDigits): Likewise.
       (setMaximumIntegerDigits): Likewise.
       (setMaximumFractionDigits): Likewise.

Thanks.