changed String(byte[] bytes, String charsetName) to support only UTF-8

This commit is contained in:
J. Treadwell 2008-11-12 10:19:21 -07:00
parent 1f7f9319c3
commit 3001c2067c

View File

@ -52,7 +52,7 @@ public final class String implements Comparable<String>, CharSequence {
throws UnsupportedEncodingException
{
this(data);
if (! charset.equals("US-ASCII")) {
if (! charset.equals("UTF-8")) {
throw new UnsupportedEncodingException(charset);
}
}