RFR: 8318096: Introduce AsymmetricKey interface with a getParams method [v4]

Joe Darcy darcy at openjdk.org
Thu Oct 26 00:52:33 UTC 2023


On Thu, 26 Oct 2023 00:23:04 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Create a parent interface `AsymmetricKey` for `PublicKey` and `PrivateKey` and add a `getParams` method there. This makes it available to all current and future public and private keys.
>> 
>> No test. Might add one.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   no longer sealed

Marked as reviewed by darcy (Reviewer).

src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java line 78:

> 76:      * @since 22
> 77:      */
> 78:     default DSAParams getParams() {

Suggestion: for this methods I recommend `@Override`-ing them and for the javadoc to used directed inheritance, roughly:


/**
 * {@inhertiDoc AsymmetricKey}
 * @implSpec ..
 * @return {@inhertiDoc AsymmetricKey}
 * @since 22
 */

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

PR Review: https://git.openjdk.org/jdk/pull/16222#pullrequestreview-1698553257
PR Review Comment: https://git.openjdk.org/jdk/pull/16222#discussion_r1372451471



More information about the security-dev mailing list