On Thu, 28 Jul 2022 13:45:53 GMT, David Schlosnagle <d...@openjdk.org> wrote:

>> I think in this case it's better to specify `StringBuilder` instead of 
>> `Appendable`, because the method is private and you'd hardly ever pass there 
>> anything different from SB.
>
> If we go with the proposal above to make `appendTo(Appendable)` package 
> visible so that `Throwable.printStackTrace()` can benefit from this as well, 
> we would need to keep this as Appendable, otherwise I agree we should just 
> inline this all into toString

`Throwable.printStackTrace()` will use `StringBuilder` as well, won't it?

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

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

Reply via email to