On Tue, 26 Apr 2022 00:27:43 GMT, Mark Powers <d...@openjdk.java.net> wrote:

>> https://bugs.openjdk.java.net/browse/JDK-8285504
>> 
>> JDK-8273046 is the umbrella bug for this bug. The changes were too large for 
>> a single code review, so it was decided to split into smaller chunks. This 
>> is one such chunk: 
>> 
>> open/src/java.base/share/classes/java/net
>
> 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`.

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

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

Reply via email to