mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8236671: NullPointerException in JKS keystore
Reviewed-by: hchao, xuelei
This commit is contained in:
parent
e9370a13b6
commit
276a1bf767
3 changed files with 17 additions and 3 deletions
|
@ -281,6 +281,9 @@ public abstract class JavaKeyStore extends KeyStoreSpi {
|
|||
if (!(key instanceof java.security.PrivateKey)) {
|
||||
throw new KeyStoreException("Cannot store non-PrivateKeys");
|
||||
}
|
||||
if (password == null) {
|
||||
throw new KeyStoreException("password can't be null");
|
||||
}
|
||||
try {
|
||||
synchronized(entries) {
|
||||
KeyEntry entry = new KeyEntry();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue