From db2f52cdba43b06cc0a1231483e189b25c7b2029 Mon Sep 17 00:00:00 2001 From: Johan Torin Date: Wed, 15 Nov 2023 14:02:53 +0100 Subject: [PATCH] Remove old API. --- .../ApplicationShutdownSupport.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/src/main/java/org/opentripplanner/framework/application/ApplicationShutdownSupport.java b/src/main/java/org/opentripplanner/framework/application/ApplicationShutdownSupport.java index 3729060b992..cd962a79d66 100644 --- a/src/main/java/org/opentripplanner/framework/application/ApplicationShutdownSupport.java +++ b/src/main/java/org/opentripplanner/framework/application/ApplicationShutdownSupport.java @@ -13,26 +13,6 @@ public final class ApplicationShutdownSupport { private ApplicationShutdownSupport() {} - /** - * Attempt to add a shutdown hook. If the application is already shutting down, the shutdown hook - * will not be added. - * - * @return true if the shutdown hook is successfully added, false otherwise. - */ - public static boolean addShutdownHook(Thread shutdownHook, String shutdownHookName) { - try { - LOG.info("Adding shutdown hook {}", shutdownHookName); - Runtime.getRuntime().addShutdownHook(shutdownHook); - return true; - } catch (IllegalStateException ignore) { - LOG.info( - "OTP is already shutting down, the shutdown hook {} will not be added", - shutdownHookName - ); - return false; - } - } - /** * Attempt to add a shutdown hook. If the application is already shutting down, the shutdown hook * will be executed immediately.