Bug 4485 - DecimalFormat not spec compliant
Summary: DecimalFormat not spec compliant
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.3.1
: P3 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-05 13:56 UTC by Tom Tromey
Modified: 2003-12-03 06:18 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-24 23:05:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2001-10-05 13:56:00 UTC
The current implementation of java.text.DecimalFormat
is not completely spec compliant.  For instance it
mishandles exponential notation in cases like "##0.#E0"
(the "scientific notation" case).

We should go through the DecimalFormat spec, write
mauve tests, and then bring the DecimalFormat implementation
up to spec.

Release:
current cvs
Comment 1 Dara Hazeghi 2003-06-08 07:05:07 UTC
Tom,

in current mauve cvs, there are tests in the following directory: gnu/testlet/java/text/
DecimalFormat . Do they correspond to what you're speaking of in this bug report? Thanks,

Dara
Comment 2 Andrew Pinski 2003-07-24 23:05:19 UTC
Trust Tom on this one.
Comment 3 gccbugz 2003-08-18 01:00:07 UTC
The following throws an exception coz it doesn't like the '%'
But, of course, it is valid

import java.text.*;
class fail {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("##0.00%"); } }
Comment 4 gccbugz 2003-08-18 01:08:45 UTC
Forgot to add:
I'm using the RedHat current rawhide version of gcc 3.3.1
(not the latest CVS)

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.1/specs
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.1/libgcj.spec
rename spec lib to liborig
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.1 20030811 (Red Hat Linux 3.3.1-1)
Comment 5 Andrew Pinski 2003-12-03 06:18:25 UTC
Fixed for 3.4 (do not know what was the patch which fixed this).