RFR 8124977 cmdline encoding challenges on Windows
Ulf Zibis
Ulf.Zibis at CoSoCo.de
Fri Jul 10 23:25:20 UTC 2015
Am 08.07.2015 um 18:50 schrieb Kirk Shoop:
> Valery prepared a new webrev which I placed here:
> http://cr.openjdk.java.net/~kshoop/8124977/webrev.01
May be better to avoid potetially superfluous lookup of UTF-8:
public static Charset defaultUnicodeCharset() {
if (defaultUnicodeCharset == null) {
synchronized (Charset.class) {
String csn = AccessController.doPrivileged(
new GetPropertyAction("file.encoding.unicode")); // indent 8 spaces !!
if (csn == null || (defaultUnicodeCharset =lookup(csn) == null)) {
defaultUnicodeCharset = forName("UTF-8");
}
}
}
return defaultUnicodeCharset;
}
-Ulf
More information about the core-libs-dev
mailing list