On Wed, 16 Nov 2022 20:22:54 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Wrong line separator
>
> src/java.base/share/classes/java/lang/template/StringTemplateImplFactory.java 
> line 187:
> 
>> 185:     @Override
>> 186:     public StringTemplate newStringTemplate(List<String> fragments, 
>> List<?> values) {
>> 187:         return new SimpleStringTemplate(List.copyOf(fragments), 
>> toList(values.stream().toArray()));
> 
> `values.toArray()` returns a new array; no need to stream the list content.
> Alt: `Arrays.asList(values.toArray())`

This is to ensure type Object[]. Ex,. if the user passes in a List<String>.

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

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

Reply via email to