Skip to content

Commit

Permalink
PartRenderingEngineTests: fix ThreadDeath
Browse files Browse the repository at this point in the history
"The type ThreadDeath has been deprecated since version 20 and marked
for removal"
  • Loading branch information
EcljpseB0T authored and jukzi committed Feb 13, 2024
1 parent 01e881a commit a0d2262
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ private void handle(Throwable ex, IEventLoopAdvisor advisor) {
try {
advisor.eventLoopException(ex);
} catch (Throwable t) {
if (t instanceof ThreadDeath td) {
throw td;
// The type ThreadDeath has been deprecated since version 20
// and marked for removal
if ("ThreadDeath".equals(t.getClass().getSimpleName())) {
// don't catch ThreadDeath by accident
throw t;
}
// couldn't handle the exception, print to console
t.printStackTrace();
Expand Down

0 comments on commit a0d2262

Please sign in to comment.