diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2009-01-02 12:46:37 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2009-01-02 12:46:37 +0000 |
commit | 217264452a18f28cd1fe9b16dcc16150652f0e46 (patch) | |
tree | 40d4d9cc5129a5767d1ecdf066075311e8fcfb47 /java | |
parent | 4eec7f038d86d45f4874bb9aef49a7d113875e94 (diff) | |
download | classpath-217264452a18f28cd1fe9b16dcc16150652f0e46.tar.gz |
Use an IntegerInstance of NumberFormat for formatting integers.
2009-01-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/text/MessageFormat.java:
(setLocale(Locale)): Integer format should use
NumberFormat.getIntegerInstance.
Diffstat (limited to 'java')
-rw-r--r-- | java/text/MessageFormat.java | 7 |
1 files changed, 1 insertions, 6 deletions
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); |