changeset 41379:509c0e9a6b47

8165101: AnchorCertificates throws NPE when cacerts file not found Reviewed-by: mullan
author ascarpino
date Mon, 10 Oct 2016 13:28:44 -0700
parents 62969f0fb9c5
children c27cf95dd7e6
files jdk/src/java.base/share/classes/sun/security/util/AnchorCertificates.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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>() {