Skip to content

Commit

Permalink
Remove dangerous Logger.fatal(...) method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bertm committed Nov 30, 2024
1 parent 82f2ede commit f75e23b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/freenet/support/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f75e23b

Please sign in to comment.