RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v21]

Jim Laskey jlaskey at openjdk.org
Wed Nov 16 17:56:37 UTC 2022


On Wed, 16 Nov 2022 15:37:10 GMT, Maurizio Cimadamore <mcimadamore at 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/StringTemplate.java line 208:
> 
>> 206: 
>> 207:     /**
>> 208:      * Returns a StringTemplate composed from a string.
> 
> is `composed` the best term here?  E.g. I'd prefer if this method actually told me what the properties of the returned template were - e.g. that it has one fragment (the string) and zero values.

`Returns a StringTemplate as if constructed by invoking <code>StringTemplate.of(List.of(string), List.of())</code>.`

Changing.

> src/java.base/share/classes/java/lang/template/StringTemplate.java line 222:
> 
>> 220: 
>> 221:     /**
>> 222:      * Returns a StringTemplate composed from fragments and values.
> 
> Suggestion:
> 
>      * Returns a StringTemplate with the given fragments and values.

Changing.

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

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


More information about the compiler-dev mailing list