This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push: new b9ee317 Inline comments b9ee317 is described below commit b9ee317c126d32f9c4b385bb20e653f052d35257 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Oct 31 07:24:00 2023 -0400 Inline comments --- .../org/apache/commons/daemon/SimpleDaemon.java | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/java/org/apache/commons/daemon/SimpleDaemon.java b/src/test/java/org/apache/commons/daemon/SimpleDaemon.java index 0740a1d..fad60de 100644 --- a/src/test/java/org/apache/commons/daemon/SimpleDaemon.java +++ b/src/test/java/org/apache/commons/daemon/SimpleDaemon.java @@ -64,10 +64,10 @@ public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal { this.directory = "/tmp"; } - /* Dump a message */ + // Dump a message System.err.println("SimpleDaemon: loading on port " + port); - /* Set up this simple daemon */ + // Set up this simple daemon this.controller = context.getController(); this.server = new ServerSocket(port); this.thread = new Thread(this); @@ -75,23 +75,23 @@ public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal { @Override public void start() { - /* Dump a message */ + // Dump a message System.err.println("SimpleDaemon: starting"); - /* Start */ + // Start this.thread.start(); } @Override public void stop() throws IOException, InterruptedException { - /* Dump a message */ + // Dump a message System.err.println("SimpleDaemon: stopping"); - /* Close the ServerSocket. This will make our thread to terminate */ + // Close the ServerSocket. This will make our thread to terminate this.stopping = true; this.server.close(); - /* Wait for the main thread to exit and dump a message */ + // Wait for the main thread to exit and dump a message this.thread.join(5000); System.err.println("SimpleDaemon: stopped"); } @@ -118,15 +118,15 @@ public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal { new Thread(handler).start(); } } catch (final IOException e) { - /* - * Don't dump any error message if we are stopping. A IOException is generated when the ServerSocket is closed in stop() - */ + // + // Don't dump any error message if we are stopping. A IOException is generated when the ServerSocket is closed in stop() + // if (!this.stopping) { e.printStackTrace(System.err); } } - /* Terminate all handlers that at this point are still open */ + // Terminate all handlers that at this point are still open final Enumeration<Handler> openhandlers = this.handlers.elements(); while (openhandlers.hasMoreElements()) { final Handler handler = openhandlers.nextElement(); @@ -139,9 +139,9 @@ public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal { @Override public void signal() { - /* - * In this example we are using soft reload on custom signal. - */ + // + // In this example we are using soft reload on custom signal. + // this.softReloadSignalled = true; }