<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v26]
Jim Laskey
jlaskey at openjdk.org
Mon Nov 21 12:47:45 UTC 2022
On Fri, 18 Nov 2022 23:05:30 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Typo
>
> src/java.base/share/classes/java/lang/template/StringProcessor.java line 49:
>
>> 47: * @implNote Implementations using {@link StringProcessor} are equivalent to implementations using
>> 48: * {@code TemplateProcessor<String>} or {@code ValidatingProcessor<String, RuntimeException>},
>> 49: * however the dominance of {@link String} producing template processors supercedes the redundancy.
>
> Amusing to read...
> Perhaps just, "however, StringProcessor is clearer and easier to understand".
Changing.
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 115:
>
>> 113: public interface StringTemplate {
>> 114: /**
>> 115: * Returns s list of fragment literals for this {@link StringTemplate}.
>
> Suggestion:
>
> * Returns a list of fragment literals for this {@link StringTemplate}.
Changing.
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 155:
>
>> 153: * For better visibility and when practical, it is recommended that users use the
>> 154: * {@link StringTemplate#STR} processor instead of invoking the
>> 155: * {@link StringTemplate#interpolate()} method directly.
>
> Removing "users use"...
>
> Suggestion:
>
> * For better visibility and when practical, it is recommended to use the
> * {@link StringTemplate#STR} processor instead of invoking the
> * {@link StringTemplate#interpolate()} method.
Changing
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 206:
>
>> 204: * @param stringTemplate the {@link StringTemplate} to represent
>> 205: *
>> 206: * @return diagnostic string representing the supplied templated string
>
> Suggestion:
>
> * @return diagnostic string representing the supplied string template
Changing.
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 317:
>
>> 315: /**
>> 316: * The {@link StringProcessor} instance conventionally used for the string interpolation
>> 317: * of a supplied {@link StringTemplate}.
>
> Suggestion:
>
> * The {@link StringProcessor} instance is conventionally used for the string interpolation
> * of a supplied {@link StringTemplate}.
Same issue as `STR`.
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 334:
>
>> 332: /**
>> 333: * The {@link TemplateProcessor} instance conventionally used to indicate that the
>> 334: * processing of the {@link StringTemplate} is to be deferred to a later time. Deferred
>
> Suggestion:
>
> * The {@link TemplateProcessor} instance is conventionally used to indicate that the
> * processing of the {@link StringTemplate} is to be deferred to a later time. Deferred
Interestingly enough, someone asked me to remove the 'is'. If you leave the 'is' in it read as 'The TemplateProcessor instance is used to indicate that the' vs 'The TemplateProcessor instance used to indicate that the' which makes more sense. Maybe 'This TemplateProcessor instance is used to indicate that the'. Changing.
-------------
PR: https://git.openjdk.org/jdk/pull/10889
More information about the i18n-dev
mailing list