RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v42]
Marius Volkhart
duke at openjdk.org
Sun Mar 5 23:21:57 UTC 2023
On Mon, 27 Feb 2023 12:47:03 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:
>
> Tighten up reporting of string template errors (fewer messages)
src/java.base/share/classes/java/lang/template/Carriers.java line 396:
> 394:
> 395: /**
> 396: * Wrapper object for carrier data. Instances types are stored in the {@code objects}
Suggestion:
* Wrapper object for carrier data. Instance types are stored in the {@code objects}
src/java.base/share/classes/java/lang/template/StringTemplate.java line 76:
> 74: * produced that returns the same lists from {@link StringTemplate#fragments()} and
> 75: * {@link StringTemplate#values()} as shown above. The {@link StringTemplate#STR} template
> 76: * processor uses these lists to yield an interpolated string. the value of {@code s} will
Suggestion:
* processor uses these lists to yield an interpolated string. The value of {@code s} will
-------------
PR: https://git.openjdk.org/jdk/pull/10889
More information about the core-libs-dev
mailing list