jdk/src/share/classes/java/util/Formatter.java
changeset 6489 9e7015635425
parent 5506 202f599c92aa
child 7273 3367d89043cf
--- a/jdk/src/share/classes/java/util/Formatter.java	Mon Aug 23 14:14:52 2010 +0900
+++ b/jdk/src/share/classes/java/util/Formatter.java	Tue Aug 31 11:27:10 2010 -0700
@@ -1866,7 +1866,7 @@
      * virtual machine.
      */
     public Formatter() {
-        init(new StringBuilder(), Locale.getDefault());
+        init(new StringBuilder(), Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -1882,7 +1882,7 @@
     public Formatter(Appendable a) {
         if (a == null)
             a = new StringBuilder();
-        init(a, Locale.getDefault());
+        init(a, Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -1949,7 +1949,7 @@
      */
     public Formatter(String fileName) throws FileNotFoundException {
         init(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fileName))),
-             Locale.getDefault());
+             Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -1985,7 +1985,7 @@
     public Formatter(String fileName, String csn)
         throws FileNotFoundException, UnsupportedEncodingException
     {
-        this(fileName, csn, Locale.getDefault());
+        this(fileName, csn, Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -2057,7 +2057,7 @@
      */
     public Formatter(File file) throws FileNotFoundException {
         init(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file))),
-             Locale.getDefault());
+             Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -2093,7 +2093,7 @@
     public Formatter(File file, String csn)
         throws FileNotFoundException, UnsupportedEncodingException
     {
-        this(file, csn, Locale.getDefault());
+        this(file, csn, Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -2152,7 +2152,7 @@
     public Formatter(PrintStream ps) {
         if (ps == null)
             throw new NullPointerException();
-        init((Appendable)ps, Locale.getDefault());
+        init((Appendable)ps, Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -2171,7 +2171,7 @@
      */
     public Formatter(OutputStream os) {
         init(new BufferedWriter(new OutputStreamWriter(os)),
-             Locale.getDefault());
+             Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**
@@ -2195,7 +2195,7 @@
     public Formatter(OutputStream os, String csn)
         throws UnsupportedEncodingException
     {
-        this(os, csn, Locale.getDefault());
+        this(os, csn, Locale.getDefault(Locale.Category.FORMAT));
     }
 
     /**