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

Jim Laskey jlaskey at openjdk.org
Thu Nov 17 15:34:44 UTC 2022

On Tue, 15 Nov 2022 22:10:14 GMT, Roger Riggs <rriggs 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 273:
>> 271: 
>> 272:     /**
>> 273:       * Combine one or more {@link StringTemplate StringTemplates} to produce a combined {@link StringTemplate}.
> The description should be more specific about how the lists of fragments and values are combined.
> For example, is each StringTemplate well formed and have the required string and value counts.
> (Or when combined, is it only the case that the total number of strings and values meet the n+1/n requirement.
> I'm not sure this API point pulls it weight in the API.

I think this javadoc was updated since.  What is happening here is non-trivial.  The use cases are primarily composing documents from several parts. Ex. an SQL PreparedStatement. You don's want to convert to string before processing, so concatenation won't do.


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

More information about the compiler-dev mailing list