8165101: AnchorCertificates throws NPE when cacerts file not found
authorascarpino
Mon, 10 Oct 2016 13:28:44 -0700 (2016-10-10)
changeset 41379 509c0e9a6b47
parent 41378 62969f0fb9c5
child 41380 c27cf95dd7e6
8165101: AnchorCertificates throws NPE when cacerts file not found Reviewed-by: mullan
jdk/src/java.base/share/classes/sun/security/util/AnchorCertificates.java
--- a/jdk/src/java.base/share/classes/sun/security/util/AnchorCertificates.java	Mon Oct 10 00:45:13 2016 -0700
+++ b/jdk/src/java.base/share/classes/sun/security/util/AnchorCertificates.java	Mon Oct 10 13:28:44 2016 -0700
@@ -31,8 +31,10 @@
 import java.security.KeyStore;
 import java.security.PrivilegedAction;
 import java.security.cert.X509Certificate;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashSet;
+import java.util.Set;
 
 import sun.security.x509.X509CertImpl;
 
@@ -44,7 +46,7 @@
 
     private static final Debug debug = Debug.getInstance("certpath");
     private static final String HASH = "SHA-256";
-    private static HashSet<String> certs;
+    private static Set<String> certs = Collections.emptySet();
 
     static  {
         AccessController.doPrivileged(new PrivilegedAction<Void>() {