<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

Chen Liang liach at openjdk.org
Thu Mar 23 16:39:16 UTC 2023


On Mon, 20 Mar 2023 20:31:46 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:

>> Enhance the Java programming language with string templates, which are similar to string literals but contain embedded expressions. A string template is interpreted at run time by replacing each expression with the result of evaluating that expression, possibly after further validation and transformation. This is a [preview language feature and API](http://openjdk.java.net/jeps/12).
>
> Jim Laskey has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Tidy javadoc
>  - Rename StringTemplate classes

src/java.base/share/classes/java/lang/runtime/StringTemplateImplFactory.java line 182:

> 180:      */
> 181:     static StringTemplate newStringTemplate(List<String> fragments, List<?> values) {
> 182:         return new SimpleStringTemplate(List.copyOf(fragments), toList(values.stream().toArray()));

Suggestion:

        return new SimpleStringTemplate(List.copyOf(fragments), values.stream().toList());

per https://github.com/openjdk/jdk/pull/10889#discussion_r1146455491

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1146462702


More information about the i18n-dev mailing list