This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: java.text.MessageFormat


Hi list,


I commited the attached patch to add a missing constructor to 
java.text.MessageFormat.


Michael
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2461
diff -u -b -B -r1.2461 ChangeLog
--- ChangeLog	19 Dec 2003 09:48:27 -0000	1.2461
+++ ChangeLog	19 Dec 2003 09:52:46 -0000
@@ -1,5 +1,10 @@
 2003-12-19  Michael Koch  <konqueror@gmx.de>
 
+	* java/text/MessageFormat.java
+	(MessageFormat): New constructor.
+
+2003-12-19  Michael Koch  <konqueror@gmx.de>
+
 	* gnu/java/net/protocol/jar/Handler.java
 	(parseURL): New method.
 	(toExternalForm): New method.
Index: java/text/MessageFormat.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/text/MessageFormat.java,v
retrieving revision 1.13
diff -u -b -B -r1.13 MessageFormat.java
--- java/text/MessageFormat.java	29 Mar 2003 21:23:25 -0000	1.13
+++ java/text/MessageFormat.java	19 Dec 2003 09:52:46 -0000
@@ -454,11 +454,25 @@
    * Creates a new MessageFormat object with
    * the specified pattern
    *
-   * @param aPattern The Pattern
+   * @param pattern The Pattern
    */
-  public MessageFormat (String pattern)
+  public MessageFormat(String pattern)
   {
-    locale = Locale.getDefault();
+    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, Locale locale)
+  {
+    this.locale = locale;
     applyPattern (pattern);
   }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]