RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v13]
Jim Laskey
jlaskey at openjdk.org
Wed Nov 9 22:48:47 UTC 2022
On Sat, 5 Nov 2022 22:23:56 GMT, Rémi Forax <forax at openjdk.org> wrote:
>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Internalize FormatConcatItem
>
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 299:
>
>> 297: * @throws NullPointerException fragments or values is null or if any of the fragments is null
>> 298: */
>> 299: public static String interpolate(List<String> fragments, List<Object> values) {
>
> Should be `String interpolate(List<String> fragments, List<?> values) {` as above
Changing
> src/java.base/share/classes/java/lang/template/StringTemplate.java line 305:
>
>> 303: int valuesSize = values.size();
>> 304: if (fragmentsSize != valuesSize + 1) {
>> 305: throw new RuntimeException("fragments must have one more element than values");
>
> Should be IllegalArgumentException (see method of() above)
Changing
-------------
PR: https://git.openjdk.org/jdk/pull/10889
More information about the compiler-dev
mailing list