On Tue, 26 Apr 2022 04:37:58 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

>> Mark Powers has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Alan Bateman comments
>
> src/java.base/share/classes/javax/net/ssl/KeyStoreBuilderParameters.java line 
> 71:
> 
>> 69:         }
>> 70: 
>> 71:         this.parameters = List.copyOf(parameters);
> 
> Hello Mark, this would actually be a change in behaviour. The `List.copyOf` 
> says:
> 
>> The given Collection must not be null and it must not contain any null 
>> elements.
> 
> The current implementation of the public constructor on the public 
> `KeyStoreBuilderParameters` mandates no such requirement. So if there's some 
> code which currently passes a list with a null element in it, then this 
> change will now end up throwing a `NullPointerException` as per the contract 
> of `List.copyOf`.

You are correct. This is not a good change since it changes behavior. Going 
back to the original. Thanks for your review!

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

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

Reply via email to