On Sat, 29 Jun 2024 19:05:18 GMT, David Schlosnagle <[email protected]> wrote:
>> Shaojin Wen has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> private method & field
>
> src/java.base/share/classes/java/lang/StringFormat.java line 48:
>
>> 46: static String format(String format, Object... args) {
>> 47: if (args != null) {
>> 48: int off = format.indexOf('%');
>
> nit: instead of not null check, should this short circuit for null/empty args?
>
> Suggestion:
>
> if (args == null || args.length == 0) {
> // no formatting to be done
> return format;
> }
>
> int off = format.indexOf('%');
j.u.Formatter supports args == null
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19956#discussion_r1659964303