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 e8a7ec4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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
2 changes: 1 addition & 1 deletion test/jdk/java/nio/charset/Charset/AliasesCopy.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) , 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down

0 comments on commit e8a7ec4

Please sign in to comment.