RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v7]

Sean Mullan mullan at openjdk.java.net
Fri May 13 20:32:45 UTC 2022


On Fri, 13 May 2022 19:35:35 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> This is to update the method javadoc of java.security.Signature.getParameters() with the missing `@throws UnsupportedOperationException`. In addition, the wording on the returned parameters are updated to match those in Cipher and CipherSpi classes. 
>> 
>> CSR will be filed later.
>> 
>> Thanks,
>> Valerie
>
> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix newline.

src/java.base/share/classes/java/security/Signature.java line 1012:

> 1010:      * values used by the underlying signature scheme. If the required
> 1011:      * parameters were not supplied and can be generated by the signature,
> 1012:      * the generated parameters are returned. However, if the signature scheme

I think one small addition to the 2nd sentence would help to cover the case where null is returned if params were not set and the impl does not generate params (regardless as to whether it supports returning them as `AlgorithmParameters`): "If the required parameters were not supplied and can be generated by the signature, the generated parameters are returned; otherwise `null` is returned."

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

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



More information about the security-dev mailing list