logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1566203 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
Date Sun, 09 Feb 2014 03:41:13 GMT
Author: ggregory
Date: Sun Feb  9 03:41:13 2014
New Revision: 1566203

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

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java?rev=1566203&r1=1566202&r2=1566203&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/CompositeAction.java
Sun Feb  9 03:41:13 2014
@@ -75,27 +75,26 @@ public class CompositeAction extends Abs
             }
 
             return true;
-        } else {
-            boolean status = true;
-            IOException exception = null;
+        }
+        boolean status = true;
+        IOException exception = null;
 
-            for (final Action action : actions) {
-                try {
-                    status &= action.execute();
-                } catch (final IOException ex) {
-                    status = false;
+        for (final Action action : actions) {
+            try {
+                status &= action.execute();
+            } catch (final IOException ex) {
+                status = false;
 
-                    if (exception == null) {
-                        exception = ex;
-                    }
+                if (exception == null) {
+                    exception = ex;
                 }
             }
+        }
 
-            if (exception != null) {
-                throw exception;
-            }
-
-            return status;
+        if (exception != null) {
+            throw exception;
         }
+
+        return status;
     }
 }



Mime
View raw message