[GitHub] [commons-daemon] garydgregory commented on a change in pull request #22: Minor Improvement:

2021-02-05 Thread GitBox


garydgregory commented on a change in pull request #22:
URL: https://github.com/apache/commons-daemon/pull/22#discussion_r571251558



##
File path: src/test/java/org/apache/commons/daemon/SimpleDaemon.java
##
@@ -28,18 +28,18 @@
  */
 public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal {
 
-private ServerSocket server=null;
-private Thread thread=null;
-private DaemonController controller=null;
-private volatile boolean stopping=false;
-private String directory=null;
-private Vector handlers=null;
+private ServerSocket server;
+private Thread thread;
+private DaemonController controller;
+private volatile boolean stopping;
+private String directory;
+private final Vector HANDLERS;
 private boolean softReloadSignalled;
 
 public SimpleDaemon() {
 System.err.println("SimpleDaemon: instance "+this.hashCode()+
" created");
-this.handlers=new Vector();
+this.HANDLERS =new Vector();

Review comment:
   It is still upper case.
   





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-daemon] garydgregory commented on a change in pull request #22: Minor Improvement:

2021-02-05 Thread GitBox


garydgregory commented on a change in pull request #22:
URL: https://github.com/apache/commons-daemon/pull/22#discussion_r571192372



##
File path: src/test/java/org/apache/commons/daemon/SimpleDaemon.java
##
@@ -28,18 +28,18 @@
  */
 public class SimpleDaemon implements Daemon, Runnable, DaemonUserSignal {
 
-private ServerSocket server=null;
-private Thread thread=null;
-private DaemonController controller=null;
-private volatile boolean stopping=false;
-private String directory=null;
-private Vector handlers=null;
+private ServerSocket server;
+private Thread thread;
+private DaemonController controller;
+private volatile boolean stopping;
+private String directory;
+private final Vector HANDLERS;
 private boolean softReloadSignalled;
 
 public SimpleDaemon() {
 System.err.println("SimpleDaemon: instance "+this.hashCode()+
" created");
-this.handlers=new Vector();
+this.HANDLERS =new Vector();

Review comment:
   Why is this upper case?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-daemon] garydgregory commented on a change in pull request #22: Minor Improvement:

2021-02-05 Thread GitBox


garydgregory commented on a change in pull request #22:
URL: https://github.com/apache/commons-daemon/pull/22#discussion_r571033303



##
File path: 
src/main/java/org/apache/commons/daemon/support/DaemonConfiguration.java
##
@@ -62,6 +62,11 @@
 private final Properties configurationProperties;
 private final Properties systemProperties;
 
+/**
+ * An empty immutable {@code String} array.
+ */

Review comment:
   This does not need to be public. You could define ONE constant to be 
package private and reuse it.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-daemon] garydgregory commented on a change in pull request #22: Minor Improvement:

2021-02-05 Thread GitBox


garydgregory commented on a change in pull request #22:
URL: https://github.com/apache/commons-daemon/pull/22#discussion_r571032801



##
File path: src/main/java/org/apache/commons/daemon/support/DaemonWrapper.java
##
@@ -40,12 +40,17 @@
 private final static String STOP_CLASS  = "stop";
 private final static String STOP_METHOD = "stop.method";
 private final static String STOP_ARGS   = "stop.args";
-private String  configFileName  = null;
+private String  configFileName;
 private final DaemonConfiguration config;
 
 private final Invoker startup;
 private final Invoker shutdown;
 
+/**
+ * An empty immutable {@code String} array.

Review comment:
   This does not need to be public does it?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org