RFR: 8236671: NullPointerException in JKS keystore

Sean Mullan mullan at openjdk.java.net
Wed Apr 21 13:23:35 UTC 2021


On Tue, 20 Apr 2021 11:54:39 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

> Trivial enough change. Improved the exception thrown from JceKeyStore also.

src/java.base/share/classes/sun/security/provider/JavaKeyStore.java line 290:

> 288: 
> 289:                 // Protect the encoding of the key
> 290:                 if (password == null) {

You could move this check earlier, before the try block.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3588



More information about the security-dev mailing list