On Fri, 28 Oct 2022 14:55:28 GMT, Jim Laskey <jlas...@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 one additional 
> commit since the last revision:
> 
>   Move StringConcatItem to FormatConcatItem

src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 365:

> 363:         Objects.requireNonNull(sts, "sts must not be null");
> 364:         if (sts.length == 0) {
> 365:             StringTemplate.of("");

Missing return?

src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 367:

> 365:             StringTemplate.of("");
> 366:         } else if (sts.length == 1) {
> 367:             return sts[0];

Check for null?

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

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

Reply via email to