This is an automated email from the ASF dual-hosted git repository.

markt 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 74a5672  Fix some obvious IDE warnings
74a5672 is described below

commit 74a5672de67696eba8b077475af2fbefa106bc6e
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 14 18:01:58 2025 +0000

    Fix some obvious IDE warnings
---
 src/test/java/org/apache/commons/daemon/ProcrunDaemon.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/daemon/ProcrunDaemon.java 
b/src/test/java/org/apache/commons/daemon/ProcrunDaemon.java
index a784898..57fdc0f 100644
--- a/src/test/java/org/apache/commons/daemon/ProcrunDaemon.java
+++ b/src/test/java/org/apache/commons/daemon/ProcrunDaemon.java
@@ -72,7 +72,7 @@ class ProcrunDaemon {
                 } else if (buf[0] == '2') {
                     System.out.println("2");
                     try {
-                        Thread.currentThread().sleep(60000);
+                        Thread.sleep(60000);
                     } catch (Exception ex) {
                         System.out.println(ex);
                     }
@@ -116,9 +116,8 @@ class ProcrunDaemon {
         System.out.println(string);
         if (string.charAt(0) == '3' || string.charAt(0) == '4') {
             /* Wait 60 seconds in the client, then sends the command to the 
server */
-            Runtime runtime = Runtime.getRuntime();
             try {
-                Thread.currentThread().sleep(60000);
+                Thread.sleep(60000);
             } catch (Exception ex) {
                 System.out.println(ex);
             }
@@ -182,6 +181,7 @@ class ProcrunDaemon {
             System.out.println("start no argv");
         }
         thrd = new Thread() {
+            @Override
             public void run() {
                 server();
             }
@@ -203,9 +203,8 @@ class ProcrunDaemon {
             String string = argv[0];
             if (string.charAt(0) == '3' || string.charAt(0) == '4') {
                 /* Wait 60 seconds in the stop */
-                Runtime runtime = Runtime.getRuntime();
                 try {
-                    Thread.currentThread().sleep(60000);
+                    Thread.sleep(60000);
                 } catch (Exception ex) {
                     System.out.println(ex);
                 }

Reply via email to