Commit 542f0c72 by Michael Koch Committed by Michael Koch

2005-04-29 Michael Koch <konqueror@gmx.de>

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

From-SVN: r98978
parent 2879b020
2005-04-29 Michael Koch <konqueror@gmx.de>
* java/nio/charset/Charset.java
(provider): Reformatted.
2005-04-29 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/http/HTTPConnection.java:
(userAgent): Initialize from system properties.
(initUserAgent): Removed.
......
/* 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.
......@@ -185,14 +185,21 @@ public abstract class Charset implements Comparable
private static CharsetProvider provider()
{
try {
String s = System.getProperty("charset.provider");
if(s != null){
CharsetProvider p =
(CharsetProvider) ((Class.forName(s)).newInstance());
return p;
}
} catch(Exception e){}
try
{
String s = System.getProperty("charset.provider");
if (s != null)
{
CharsetProvider p =
(CharsetProvider) ((Class.forName(s)).newInstance());
return p;
}
}
catch (Exception e)
{
// Ignore.
}
return Provider.provider();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment