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

Valerie Peng valeriep at openjdk.java.net
Mon May 2 21:46:20 UTC 2022


On Fri, 29 Apr 2022 04:27:36 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> What kind of additional sentence do you have in mind?
>
>> What kind of additional sentence do you have in mind?
> 
> It may be fine to put it into the state for 'null" returned value.  For example:
> 
> 
> The returned parameters may be the same that were used to initialize
> this signature, or may contain additional default or random parameter
> values used by the underlying signature implementation, or null if the
> underlying signature implementation does not support returning the
> parameters as {@code AlgorithmParameters}.
> 
> 
> 
> The null return conditional in the following sentence may be able to combine together.
> 
> 
> The returned parameters may be the same that were used to initialize
> this signature, or may contain additional default or random parameter
> values used by the underlying signature implementation.  {@code null}
> may be returned if the underlying signature implementation does not
> support returning the parameters as {@code AlgorithmParameters}, or <more conditions>

How about the case when no parameters are given? Say A is the user-supplied values, B is the provider specific default or random values, your suggestion has A, A+B, and null. Isn't the sentence about B needed (no A and provider can generate the parameters)?

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

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



More information about the security-dev mailing list