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

ExE Boss duke at openjdk.org
Sun Nov 6 13:34:20 UTC 2022

On Thu, 3 Nov 2022 17:23:53 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 one additional commit since the last revision:
>   Internalize FormatConcatItem

src/java.base/share/classes/java/util/FormatItem.java line 75:

> 73:         try {
> 74:             return (long)CHAR_MIX.invokeExact(lengthCoder, value);
> 75:         } catch (RuntimeException ex) {

This should also rethrow `Error` instances:

        } catch (Error | RuntimeException ex) {


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

More information about the compiler-dev mailing list