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 81e317f Inline comments
81e317f is described below
commit 81e317fe089e2c2acd002f07e72e1dc22b1c35db
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Oct 31 07:22:47 2023 -0400
Inline comments
---
.../org/apache/commons/daemon/support/DaemonLoader.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
b/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
index 4c38498..f1b9f62 100644
--- a/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
+++ b/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
@@ -183,10 +183,10 @@ public final class DaemonLoader
daemon = c.getConstructor().newInstance();
if (isdaemon) {
- /* Create a new controller instance */
+ // Create a new controller instance
controller = new Controller();
- /* Set the availability flag in the controller */
+ // Set the availability flag in the controller
controller.setAvailable(false);
/* Create context */
@@ -194,7 +194,7 @@ public final class DaemonLoader
context.setArguments(args);
context.setController(controller);
- /* Now we want to call the init method in the class */
+ // Now we want to call the init method in the class
final Object[] arg = new Object[1];
arg[0] = context;
init.invoke(daemon, arg);
@@ -208,7 +208,7 @@ public final class DaemonLoader
}
catch (final InvocationTargetException e) {
final Throwable thrown = e.getTargetException();
- /* DaemonInitExceptions can fail with a nicer message */
+ // DaemonInitExceptions can fail with a nicer message
if (thrown instanceof DaemonInitException) {
failed(((DaemonInitException) thrown).getMessageWithCause());
}
@@ -218,13 +218,12 @@ public final class DaemonLoader
return false;
}
catch (final Throwable t) {
- /* In case we encounter ANY error, we dump the stack trace and
- * return false (load, start and stop won't be called).
- */
+ // In case we encounter ANY error, we dump the stack trace and
+ // return false (load, start and stop won't be called).
t.printStackTrace(System.err);
return false;
}
- /* The class was loaded and instantiated correctly, we can return */
+ // The class was loaded and instantiated correctly, we can return
return true;
}