From f75e23b61efa1de49c7cf26c98ea891c9a24cfcf Mon Sep 17 00:00:00 2001 From: Bert Massop Date: Sat, 30 Nov 2024 13:18:01 +0100 Subject: [PATCH] Remove dangerous Logger.fatal(...) method No sane logger method has System.exit() as a side effect. Fortunately this log method is never used anywhere in Fred. Let's assume it is not used in plugins either and remove it. --- src/freenet/support/Logger.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/freenet/support/Logger.java b/src/freenet/support/Logger.java index 00cbcda4a8..f74bbc3cc7 100644 --- a/src/freenet/support/Logger.java +++ b/src/freenet/support/Logger.java @@ -619,17 +619,6 @@ public void shouldUpdate() { registerLogThresholdCallback(ltc); } - - /** - * Report a fatal error and exit. - * @param cause the object or class involved - * @param retcode the return code - * @param message the reason why - */ - public static void fatal(Object cause, int retcode, String message) { - error(cause, message); - System.exit(retcode); - } /** Add a logger hook to the global logger hook chain. Messages which * are not filtered out by the global logger hook chain's thresholds