8165101: AnchorCertificates throws NPE when cacerts file not found
Reviewed-by: mullan
--- 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>() {