On Tue, 23 Mar 2021 21:54:33 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> I'm not sure how String.repeat can be used here. Repeated String is not 
>> constant and different for each iteration.
>
> Long runs of whitespace, especially in blank strings, may have poor 
> readability. I was thinking that
> 
> " ".repeat(7) and " ".repeat(10)
>  
> 
> might read better than 
> 
> "       " and "          "
> 
> respectively. If you don't agree, then simply disregard what I said. If you 
> agree but worry about negative performance implications, consider creating 
> these strings before the respective for-loops.

I suggest we ignore the use case for `String.repeat` here, and leave the patch 
as is.

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

PR: https://git.openjdk.java.net/jdk/pull/2922

Reply via email to