On Tue, 29 Nov 2022 12:35:36 GMT, Daniel Fuchs <[email protected]> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   review comment
>
> src/java.base/share/classes/java/net/HostPortrange.java line 189:
> 
>> 187:                 sb.append((char)(c - CASE_DIFF));
>> 188:             } else {
>> 189:                 final String invalidChar = String.format("\\u%04x", 
>> (int) c);
> 
> Why not construct the whole message using String.format? It would avoid the 
> string concatenation below...

That's certainly better. I've now updated the PR to follow that suggestion. The 
new test continues to pass.

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

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

Reply via email to