On Tue, 22 Nov 2022 19:09:12 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Seal Digits
>
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 319:
> 
>> 317:      * This {@link StringProcessor} instance is conventionally used for 
>> the string interpolation
>> 318:      * of a supplied {@link StringTemplate}.
>> 319:      * <p>
> 
> It should be mentioned that the string representations are created as if 
> invoking {@link String#valueOf}.
> An perhaps a link/@see to `FMT` for control over formatting.  
> 
> Also include it in the javadoc for `interpolate`.

Changing.

> src/java.base/share/classes/java/util/FormatProcessor.java line 64:
> 
>> 62:  *
>> 63:  * @implSpec Since, values are found within the string template, 
>> argument indexing
>> 64:  * specifiers are unsupported.
> 
> What is the behavior of a format that references an index?  Ignored, throw?
> I can see an argument for simplicity, but the values are a sequential list 
> similar to that of a varargs call to format("xx", x, y, z, ...) so it can be 
> well defined to what value an index in the format refers.

Kind of blows the whole concept of embedded expressions. This is one of those, 
just because you can, doesn't mean you should.

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

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

Reply via email to