RFR: 8291641: Optimize StackTraceElement.toString()
Сергей Цыпанов
duke at openjdk.org
Mon Aug 1 17:31:54 UTC 2022
On Thu, 28 Jul 2022 13:45:53 GMT, David Schlosnagle <duke at 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
More information about the core-libs-dev
mailing list