commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1700913 - /commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
Date Wed, 02 Sep 2015 21:57:42 GMT
Author: ggregory
Date: Wed Sep  2 21:57:41 2015
New Revision: 1700913

URL: http://svn.apache.org/r1700913
Log:
Statement unnecessarily nested within else clause.

Modified:
    commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java

Modified: commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java?rev=1700913&r1=1700912&r2=1700913&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
(original)
+++ commons/proper/daemon/trunk/src/main/java/org/apache/commons/daemon/support/DaemonLoader.java
Wed Sep  2 21:57:41 2015
@@ -106,9 +106,7 @@ public final class DaemonLoader
                 signal.invoke(daemon, new Object[0]);
                 return true;
             }
-            else {
-                System.out.println("Daemon doesn't support signaling");
-            }
+            System.out.println("Daemon doesn't support signaling");
         } catch (Throwable ex) {
             System.err.println("Cannot send signal: " + ex);
             ex.printStackTrace(System.err);
@@ -347,10 +345,8 @@ public final class DaemonLoader
                 if (!this.isAvailable()) {
                     throw new IllegalStateException();
                 }
-                else {
-                    this.setAvailable(false);
-                    DaemonLoader.shutdown(false);
-                }
+                this.setAvailable(false);
+                DaemonLoader.shutdown(false);
             }
         }
 
@@ -361,10 +357,8 @@ public final class DaemonLoader
                 if (!this.isAvailable()) {
                     throw new IllegalStateException();
                 }
-                else {
-                    this.setAvailable(false);
-                    DaemonLoader.shutdown(true);
-                }
+                this.setAvailable(false);
+                DaemonLoader.shutdown(true);
             }
         }
 



Mime
View raw message