On Thu, 2 Mar 2023 17:27:59 GMT, Afshin Zafari <[email protected]> wrote:
>> test/lib/jdk/test/lib/process/ProcessTools.java line 827:
>>
>>> 825:
>>> 826: public void uncaughtException(Thread t, Throwable e) {
>>> 827: if (e instanceof Error && t.getState() ==
>>> State.TERMINATED) {
>>
>> Dropping the check for ThreadDeath is fine but checking the thread state is
>> puzzling. When a Thread completes with an uncaught exception/error then the
>> UHE is called from the thread before it terminates so it's state won't be
>> TERMINATED. Is there more going on here that the UHE is called with an
>> already terminated Thread?
>
> I assumed the `ThreadDeath` was there to catch `Thread.stop()` calls and just
> ignore them. So, I wanted to keep this functionality.
> Can we remove using `ThreadDeath` relying on that `Thread.stop()` is also
> deprecated?
I think it can be removed.
-------------
PR: https://git.openjdk.org/jdk/pull/12827