<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]
Jim Laskey
jlaskey at openjdk.org
Thu Mar 23 17:09:16 UTC 2023
On Thu, 23 Mar 2023 16:25:22 GMT, Rémi Forax <forax at 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
More information about the i18n-dev
mailing list