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

Valerie Peng valeriep at openjdk.java.net
Thu May 5 22:08:04 UTC 2022


On Wed, 4 May 2022 04:16:42 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> 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)?
>
> I think this sentence covers case B, "... or may contain additional default or random parameter
> values used by the underlying signature implementation."

Sean's comment on the other PR regarding Cipher.getParameters implies otherwise, i.e. `A few comments:

    I don't think this new text covers the case where the cipher is not initialized with any parameters, but the provider returns parameters. I tried to think of how to say that all in one sentence, but I think it is best to have two sentences covering each case, ex: "If this cipher was not initialized with parameters, the returned parameters may be null or may be ..." "If this cipher was initialized with parameters, the returned parameters may be the same or may be ..."`

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

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



More information about the security-dev mailing list