[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 10:01:54 -0400 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818) |
Patch #1787 has been updated.
Project:
Category: None
Status: Open
Summary: bug fix to java.text.DecimalFormat
Follow-Ups:
Date: Fri 08/01/2003 at 20: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: Sat 08/02/2003 at 04: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 12: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 14: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.
-------------------------------------------------------
-------------------------------------------------------
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/