RFR: JDK-8293093 NPE in P11KeyStore.getID

Mark Powers mpowers at openjdk.org
Mon Oct 24 18:26:42 UTC 2022


On Sat, 22 Oct 2022 15:37:38 GMT, Florent Guillaume <duke at openjdk.org> wrote:

>> https://bugs.openjdk.org/browse/JDK-8293093
>
> Given the repeated code wouldn't you want to create a small helper method like `getIDNullSafe`?

@efge Good suggestion. And having `NullSafe` in the name answers an important question.

@XueleiFan Regarding `updatePkey`, `getID` is only used for exception messages. I'm going to use `getIDNullSafe` to prevent an unexpected exception doesn't throw yet another exception.

@ascarpino Agreed.

@seanjmullan `noreg-trivial`

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

PR: https://git.openjdk.org/jdk/pull/10823



More information about the security-dev mailing list