<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

Jim Laskey jlaskey at openjdk.org
Wed Mar 22 14:43:44 UTC 2023


On Tue, 21 Mar 2023 13:37:02 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/StringTemplate.java line 69:
>> 
>>> 67:  * List<Object> values = st.values();
>>> 68:  * }
>>> 69:  * The value of {@code fragments} will be equivalent to {@code List.of("", " + ", " = ", "")},
>> 
>> This is a bit hard to parse, due to the use of `the value of` (which then becomes problematic in the next para, as we are talking about `values`). Either change the name of the variable `values` in the snippet, or use some other locution, like "the list {@code fragments} is equivalent to ..." etc.
>
> The above comment also applies to the javadoc of the `fragments` and `values` methods, which use a similar way to describe their results.

* {@code fragments} will be equivalent to {@code List.of("", " + ", " = ", "")},
 * which includes the empty first and last fragments. {@code values} will be the
 * equivalent of {@code List.of(10, 20, 30)}.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1144904923


More information about the i18n-dev mailing list