On Thu, 23 Mar 2023 16:25:22 GMT, Rémi Forax <fo...@openjdk.org> wrote:
>> The values list can't be null-hostile for the same reason that string >> concatenation can't be null-hostile. Please point to examples of >> null-hostile lists (other that fragments) being used in the template code. >> Apologies if I misinterpreted your meaning. > > There is a trick to do a defensive copy in case the list can contains a null, > you can use `stream.toList()`, > so > > List<Object> asList = Arrays.stream(values).toList(); > > is what you are looking for. Changed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1146507389