On Sun, 20 Nov 2022 07:56:59 GMT, Alan Bateman <al...@openjdk.org> wrote:

> Jai is correct, this constructor appears to have tolerated null in the second 
> parameter since JDK 1.0 so we need to proceed with care.

I have fixe this in 
https://github.com/openjdk/jdk/pull/11249/commits/b6ccec209f3989ca37ac15585d27e28c2dddfb14,
 so it still uses `List.of` but keeps the historic behavior.

I wonder if we shouldn't change the Javadocs so they clearly tell the reader 
that `s2` MAY be `null`?

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

PR: https://git.openjdk.org/jdk/pull/11249

Reply via email to