No need to nest an else clause.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/379b6ea3
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/379b6ea3
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/379b6ea3

Branch: refs/heads/feature/LOG4J2-1430
Commit: 379b6ea3ca1427f1b503541f10f2d245403ea075
Parents: 6ac5219
Author: ggregory <ggreg...@apache.org>
Authored: Wed Aug 31 09:28:26 2016 -0700
Committer: ggregory <ggreg...@apache.org>
Committed: Wed Aug 31 09:28:26 2016 -0700

----------------------------------------------------------------------
 .../core/config/builder/impl/DefaultConfigurationBuilder.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/379b6ea3/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
index b9e8de5..4319515 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/impl/DefaultConfigurationBuilder.java
@@ -205,9 +205,8 @@ public class DefaultConfigurationBuilder<T extends 
BuiltConfiguration> implement
         } catch (XMLStreamException e) {
             if (e.getNestedException() instanceof IOException) {
                 throw (IOException)e.getNestedException();
-            } else {
-                throw new RuntimeException(e);
             }
+            throw new RuntimeException(e);
         }
     }
 

Reply via email to