From 807243e6bff02d2122b6554a6a48e915dafa32bb Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Wed, 20 Sep 2023 11:43:47 -0700 Subject: [PATCH] Remove usages of deprecated `ThreadDeath` (#8487) --- core/src/main/java/hudson/model/Run.java | 4 ---- .../main/java/hudson/model/listeners/SaveableListener.java | 2 -- 2 files changed, 6 deletions(-) diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index 87644b3aa343..fc790c3e8985 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -1896,8 +1896,6 @@ protected final void execute(@NonNull RunExecution job) { LOGGER.log(FINE, "{0} main build action completed: {1}", new Object[] {this, result}); CheckPoint.MAIN_COMPLETED.report(); - } catch (ThreadDeath t) { - throw t; } catch (AbortException e) { // orderly abortion. result = Result.FAILURE; listener.error(e.getMessage()); @@ -1919,8 +1917,6 @@ protected final void execute(@NonNull RunExecution job) { // even if the main build fails fatally, try to run post build processing job.post(Objects.requireNonNull(listener)); - } catch (ThreadDeath t) { - throw t; } catch (Throwable e) { handleFatalBuildProblem(listener, e); result = Result.FAILURE; diff --git a/core/src/main/java/hudson/model/listeners/SaveableListener.java b/core/src/main/java/hudson/model/listeners/SaveableListener.java index 51cac4861a57..46bbc6ab60be 100644 --- a/core/src/main/java/hudson/model/listeners/SaveableListener.java +++ b/core/src/main/java/hudson/model/listeners/SaveableListener.java @@ -80,8 +80,6 @@ public static void fireOnChange(Saveable o, XmlFile file) { for (SaveableListener l : all()) { try { l.onChange(o, file); - } catch (ThreadDeath t) { - throw t; } catch (Throwable t) { Logger.getLogger(SaveableListener.class.getName()).log(Level.WARNING, null, t); }