From 217264452a18f28cd1fe9b16dcc16150652f0e46 Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Fri, 2 Jan 2009 12:46:37 +0000 Subject: Use an IntegerInstance of NumberFormat for formatting integers. 2009-01-02 Andrew John Hughes * java/text/MessageFormat.java: (setLocale(Locale)): Integer format should use NumberFormat.getIntegerInstance. --- ChangeLog | 6 ++++++ java/text/MessageFormat.java | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea6d9dcd7..1e489de08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-01-02 Andrew John Hughes + + * java/text/MessageFormat.java: + (setLocale(Locale)): Integer format should use + NumberFormat.getIntegerInstance. + 2008-12-31 Andrew John Hughes * java/text/MessageFormat.java: diff --git a/java/text/MessageFormat.java b/java/text/MessageFormat.java index 8c2a02322..700b187fe 100644 --- a/java/text/MessageFormat.java +++ b/java/text/MessageFormat.java @@ -99,12 +99,7 @@ public class MessageFormat extends Format else if (style.equals("percent")) format = NumberFormat.getPercentInstance(loc); else if (style.equals("integer")) - { - NumberFormat nf = NumberFormat.getNumberInstance(loc); - nf.setMaximumFractionDigits(0); - nf.setGroupingUsed(false); - format = nf; - } + format = NumberFormat.getIntegerInstance(loc); else { format = NumberFormat.getNumberInstance(loc); -- cgit v1.2.1