Skip to content

Commit

Permalink
Used convenient method in VM
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Nov 15, 2023
1 parent ea4f9bd commit 2507506
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/java.base/share/classes/java/nio/charset/Charset.java
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,12 @@ public static Charset defaultCharset() {
* If the canonical name or any of the aliases are illegal
*/
protected Charset(String canonicalName, String[] aliases) {
String[] as = aliases == null ?
String[] as =
aliases == null ?
zeroAliases :
(this.getClass().getClassLoader() == null ||
this.getClass().getClassLoader() == ClassLoader.getPlatformClassLoader()) ?
aliases :
Arrays.copyOf(aliases, aliases.length);
VM.isSystemDomainLoader(getClass().getClassLoader()) ?
aliases :
Arrays.copyOf(aliases, aliases.length);

// Skip checks for the standard, built-in Charsets we always load
// during initialization.
Expand Down

0 comments on commit 2507506

Please sign in to comment.