On Tue, 11 Aug 2026 12:54:48 GMT, Jaikiran Pai <[email protected]> wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/Http2TerminationCause.java
>> line 209:
>>
>>> 207: // if the original termination cause's exception chain doesn't
>>> contain an
>>> 208: // exception of some specific types, then we don't replace the
>>> original termination cause
>>> 209: while (t != null) {
>>
>> This stack trace walking idiom will fail with `StackOverflowError` on
>> circular exceptions.
>
> It would be a never ending loop and not a `StackOverflowError`, isn't it?
>
> We have similar construct in some other places (for example,
> `Utils.getIOException(...)` where it would indeed be a `StackOverFlowError`).
> I'll think a bit more about this and see if it's practical and if we should
> do anything here to prevent potential never ending loop.
Right. The construct will result in not an `SOE`, but an infinite loop.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/32278#discussion_r3758232629