Hi list,

I commited the attached patch to reformat the defaultCharset() method of
java.nio.charset.Charset.


Michael


2005-04-29  Michael Koch  <[EMAIL PROTECTED]>

        * java/nio/charset/Charset.java
        (defaultCharset): Reformatted.

Index: java/nio/charset/Charset.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/nio/charset/Charset.java,v
retrieving revision 1.19
diff -u -r1.19 Charset.java
--- java/nio/charset/Charset.java       28 Apr 2005 05:39:21 -0000      1.19
+++ java/nio/charset/Charset.java       29 Apr 2005 06:47:34 -0000
@@ -1,5 +1,5 @@
 /* Charset.java -- 
-   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -126,22 +126,39 @@
   public static Charset defaultCharset()
   {
     String encoding;
+    
     try 
       {
        encoding = System.getProperty("file.encoding");
-      } catch(SecurityException e) {
+      }
+    catch(SecurityException e)
+      {
+       // Use fallback.
        encoding = "ISO-8859-1";
-      } catch(IllegalArgumentException e) {
+      }
+    catch(IllegalArgumentException e)
+      {
+       // Use fallback.
        encoding = "ISO-8859-1";
       }
 
     try
       {
        return forName(encoding);
-      } catch(UnsupportedCharsetException e) {
-      } catch(IllegalCharsetNameException e) {
-      } catch(IllegalArgumentException e) {
       }
+    catch(UnsupportedCharsetException e)
+      {
+       // Ignore.
+      }
+    catch(IllegalCharsetNameException e)
+      {
+       // Ignore.
+      }
+    catch(IllegalArgumentException e)
+      {
+       // Ignore.
+      }
+    
     throw new IllegalStateException("Can't get default charset!");
   }
 
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to