RFR: 8318096: Add getParams method in PublicKey and PrivateKey

Sean Mullan mullan at openjdk.org
Tue Oct 17 18:42:45 UTC 2023


On Tue, 17 Oct 2023 15:30:03 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Add `getParams` to `PublicKey` and `PrivateKey` so it's available to all current and future public and private keys.
> 
> No test. Might add one.

src/java.base/share/classes/java/security/PrivateKey.java line 86:

> 84:      * The default implementation returns {@code null}.
> 85:      *
> 86:      * @return the associated parameters, may be null

Put `@code` around null. Same comment applies to other `getParams` methods.

src/java.base/share/classes/java/security/PrivateKey.java line 89:

> 87:      * @since 22
> 88:      */
> 89:     default AlgorithmParameterSpec getParams(){

Nit: add space before `{`. Same comment applies to other getParams methods.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1362598718
PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1362597869



More information about the security-dev mailing list