[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch #1787] [Patch #1787] bug fix to java.text.DecimalFormat
From: |
noreply |
Subject: |
[patch #1787] [Patch #1787] bug fix to java.text.DecimalFormat |
Date: |
Mon, 04 Aug 2003 16:35:58 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 |
Patch #1787 has been updated.
Project:
Category: None
Status: Closed
Summary: bug fix to java.text.DecimalFormat
Follow-Ups:
Date: Fri 08/01/2003 at 14:46
By: groved
Comment:
import java.text.*;
class NumberFormatTest {
public static void main(String[] args) {
DecimalFormat f = new DecimalFormat();
f.setGroupingSize(0);
System.out.println(f.format(100000));
}
}
-------------------------------------------------------
Date: Fri 08/01/2003 at 22:11
By: tromey
Comment:
Thanks for the test case.
If you check isGroupingUsed() with the JDK,
you'll see it is still set after the formatting.
I think we need a different approach.
I suggest adding this to the test.
And I agree the test should go in Mauve.
-------------------------------------------------------
Date: Mon 08/04/2003 at 06:02
By: groved
Comment:
thanks. I'll expand the test case and come up with a better fix. Will submit
a new patch (with ChangeLog entry ;)) soon.
-------------------------------------------------------
Date: Mon 08/04/2003 at 08:01
By: groved
Comment:
Take an alternate approach: guard all divisions by groupingSize with a check to
be sure groupingSize is not zero.
Changelog:
* java/text/DecimalFormat.java:
(format): avoid ArithmeticException when groupingSize is 0.
(parse): Likewise.
-------------------------------------------------------
Date: Mon 08/04/2003 at 14:35
By: tromey
Comment:
Looks good, I checked this in.
I'm putting a test case in Mauve too.
-------------------------------------------------------
-------------------------------------------------------
For more info, visit:
http://savannah.gnu.org/patch/?func=detailpatch&patch_id=1787&group_id=85
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/