commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1802194 - /commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java
Date Mon, 17 Jul 2017 19:26:04 GMT
Author: ggregory
Date: Mon Jul 17 19:26:04 2017
New Revision: 1802194

URL: http://svn.apache.org/viewvc?rev=1802194&view=rev
Log:
Always use blocks.

Modified:
    commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java

Modified: commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java?rev=1802194&r1=1802193&r2=1802194&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java
(original)
+++ commons/proper/daemon/trunk/src/test/java/org/apache/commons/daemon/SimpleDaemon.java
Mon Jul 17 19:26:04 2017
@@ -65,9 +65,14 @@ public class SimpleDaemon implements Dae
 
         final String[] a = context.getArguments();
 
-        if (a.length>0) port=Integer.parseInt(a[0]);
-        if (a.length>1) this.directory=a[1];
-        else this.directory="/tmp";
+        if (a.length>0) {
+            port=Integer.parseInt(a[0]);
+        }
+        if (a.length>1) {
+            this.directory=a[1];
+        } else {
+            this.directory="/tmp";
+        }
 
         /* Dump a message */
         System.err.println("SimpleDaemon: loading on port "+port);
@@ -127,7 +132,9 @@ public class SimpleDaemon implements Dae
         } 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() */
-            if (!this.stopping) e.printStackTrace(System.err);
+            if (!this.stopping) {
+                e.printStackTrace(System.err);
+            }
         }
 
         /* Terminate all handlers that at this point are still open */



Mime
View raw message