On Fri, 4 Oct 2024 16:18:29 GMT, Kevin Driver <kdri...@openjdk.org> wrote:

>> Weijun Wang has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains six additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' into 8340327
>>  - more test, more RAW support, fix a bug on cleaning up getRawBytes output
>>  - add support for private class RawKeySpec
>>  - ensure key is intact after being used
>>  - renames
>>  - the fix
>
> src/java.base/share/classes/sun/security/provider/NamedKEM.java line 62:
> 
>> 60:         this.fname = Objects.requireNonNull(fname);
>> 61:         if (pnames == null || pnames.length == 0) {
>> 62:             throw new AssertionError("pnames cannot be null or empty");
> 
> Only curious: why `AssertionError` here instead of `IllegalArgumentException` 
> or `InvalidParameterException`?

See also: checking the `spec` parameter in `engineNewEncapsulator`, which does 
use `InvalidParameterException`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21167#discussion_r1787949281

Reply via email to