/[classpath]/classpath/java/nio/charset/Charset.java
ViewVC logotype

Diff of /classpath/java/nio/charset/Charset.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by mkoch, Thu Apr 28 05:39:21 2005 UTC revision 1.20 by mkoch, Fri Apr 29 06:49:57 2005 UTC
# Line 1  Line 1 
1  /* Charset.java --  /* Charset.java --
2     Copyright (C) 2002, 2004  Free Software Foundation, Inc.     Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 126  public abstract class Charset implements Line 126  public abstract class Charset implements
126    public static Charset defaultCharset()    public static Charset defaultCharset()
127    {    {
128      String encoding;      String encoding;
129        
130      try      try
131        {        {
132          encoding = System.getProperty("file.encoding");          encoding = System.getProperty("file.encoding");
133        } catch(SecurityException e) {        }
134        catch(SecurityException e)
135          {
136            // Use fallback.
137          encoding = "ISO-8859-1";          encoding = "ISO-8859-1";
138        } catch(IllegalArgumentException e) {        }
139        catch(IllegalArgumentException e)
140          {
141            // Use fallback.
142          encoding = "ISO-8859-1";          encoding = "ISO-8859-1";
143        }        }
144    
145      try      try
146        {        {
147          return forName(encoding);          return forName(encoding);
       } catch(UnsupportedCharsetException e) {  
       } catch(IllegalCharsetNameException e) {  
       } catch(IllegalArgumentException e) {  
148        }        }
149        catch(UnsupportedCharsetException e)
150          {
151            // Ignore.
152          }
153        catch(IllegalCharsetNameException e)
154          {
155            // Ignore.
156          }
157        catch(IllegalArgumentException e)
158          {
159            // Ignore.
160          }
161        
162      throw new IllegalStateException("Can't get default charset!");      throw new IllegalStateException("Can't get default charset!");
163    }    }
164    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26