On Wed, 26 Apr 2023 21:36:19 GMT, Weijun Wang <wei...@openjdk.org> wrote:

> I checked for our implementations, and until now all I found is IKE. Even the 
> PBEWithMD5AndDES algorithm mentioned in 
> https://bugs.openjdk.org/browse/JDK-4953551 also throws an IKE.
> 
> I'd rather follow the existing style. If it’s not clear enough, I can update 
> the line to
> 
> ```
> @throws InvalidKeyException if {@code publicKey} is {@code null} or invalid
> ```

I'll leave it up to you, or consensus from others. This one particular issue is 
probably not going to overly affect the API much.

The APIs you referenced were created a long time ago before more accepted API 
best practices evolved. Also, this API already throws NPE in other methods when 
a required parameter is `null`, so these methods seem inconsistent with the way 
it treats `null` parameters.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13256#discussion_r1179150432

Reply via email to