From f1af10c25d71873b4d1a1274e090ac4147294919 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Fri, 19 Dec 2003 09:53:06 +0000 Subject: [PATCH] 2003-12-19 Michael Koch * java/text/MessageFormat.java (MessageFormat): New constructor. From-SVN: r74828 --- libjava/ChangeLog | 5 +++++ libjava/java/text/MessageFormat.java | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index aeca31281e8..50cf99a3cc6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-12-19 Michael Koch + + * java/text/MessageFormat.java + (MessageFormat): New constructor. + 2003-12-19 Michael Koch * gnu/java/net/protocol/jar/Handler.java diff --git a/libjava/java/text/MessageFormat.java b/libjava/java/text/MessageFormat.java index caeb7265f46..e34fe2c89d1 100644 --- a/libjava/java/text/MessageFormat.java +++ b/libjava/java/text/MessageFormat.java @@ -454,11 +454,25 @@ public class MessageFormat extends Format * Creates a new MessageFormat object with * the specified pattern * - * @param aPattern The Pattern + * @param pattern The Pattern + */ + public MessageFormat(String pattern) + { + this(pattern, Locale.getDefault()); + } + + /** + * Creates a new MessageFormat object with + * the specified pattern + * + * @param pattern The Pattern + * @param locale The Locale to use + * + * @since 1.4 */ - public MessageFormat (String pattern) + public MessageFormat(String pattern, Locale locale) { - locale = Locale.getDefault(); + this.locale = locale; applyPattern (pattern); } -- 2.30.2