On Thu, 2 Mar 2023 12:15:21 GMT, Afshin Zafari <d...@openjdk.org> wrote:
> ### Description > The use of `ThreadDeath` is replaced with checking the exception be of type > `Error` and the thread is `TERMINATED`. > > > ### Test > local and mach5 tier1 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? ------------- PR: https://git.openjdk.org/jdk/pull/12827