src/java.base/share/classes/sun/security/util/DomainName.java
changeset 59024 b046ba510bbc
parent 52902 e3398b2e1ab0
--- a/src/java.base/share/classes/sun/security/util/DomainName.java	Tue Nov 12 10:19:04 2019 +0100
+++ b/src/java.base/share/classes/sun/security/util/DomainName.java	Tue Nov 12 01:36:17 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, 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
@@ -45,6 +45,8 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import sun.security.ssl.SSLLogger;
 
 /**
@@ -151,7 +153,7 @@
         private final boolean hasExceptions;
 
         private Rules(InputStream is) throws IOException {
-            InputStreamReader isr = new InputStreamReader(is, "UTF-8");
+            InputStreamReader isr = new InputStreamReader(is, UTF_8);
             BufferedReader reader = new BufferedReader(isr);
             boolean hasExceptions = false;