mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8200310: Avoid charset lookup machinery in java.nio.charset.StandardCharsets
Reviewed-by: sherman, ulfzibis
This commit is contained in:
parent
08adfe31b3
commit
4546512c19
11 changed files with 31 additions and 30 deletions
|
@ -26,7 +26,6 @@
|
|||
package java.nio.charset;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
import sun.nio.cs.StandardCharsets;
|
||||
import sun.nio.cs.ThreadLocalCoders;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
|
@ -311,7 +310,8 @@ public abstract class Charset
|
|||
}
|
||||
|
||||
/* The standard set of charsets */
|
||||
private static final CharsetProvider standardProvider = new StandardCharsets();
|
||||
private static final CharsetProvider standardProvider
|
||||
= new sun.nio.cs.StandardCharsets();
|
||||
|
||||
private static final String[] zeroAliases = new String[0];
|
||||
|
||||
|
@ -609,7 +609,7 @@ public abstract class Charset
|
|||
if (cs != null)
|
||||
defaultCharset = cs;
|
||||
else
|
||||
defaultCharset = sun.nio.cs.UTF_8.INSTANCE;
|
||||
defaultCharset = StandardCharsets.UTF_8;
|
||||
}
|
||||
}
|
||||
return defaultCharset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue