RFR: 8285396: Do not fill in the stacktrace of an internal exception [v2]

Pavel Rappo prappo at openjdk.java.net
Mon Apr 25 20:45:57 UTC 2022


On Thu, 21 Apr 2022 23:28:16 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> Sometimes an exception is retrofitted into control flow to interrupt it in a way that it wasn't originally designed to be interrupted. Such an exception is an implementation detail. Once the exception is caught internally, it is discarded.
>> 
>> An exception has a stacktrace. Filling in a stacktrace is not free. Filling in a stacktrace that won't be used seems like a waste.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Address feedback

I'm closing this PR because we decided to address the stacktrace issue by getting rid of exceptions altogether in another PR: https://github.com/openjdk/jdk/pull/8369. However, I will file an issue to retrofit `(Doc)Pretty` with `java.io.UncheckedIOException`.

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

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


More information about the compiler-dev mailing list