logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516459 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
Date Thu, 22 Aug 2013 14:20:35 GMT
Author: ggregory
Date: Thu Aug 22 14:20:35 2013
New Revision: 1516459

URL: http://svn.apache.org/r1516459
Log:
Statements unnecessarily nested within else clause.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java?rev=1516459&r1=1516458&r2=1516459&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/helpers/Loader.java
Thu Aug 22 14:20:35 2013
@@ -189,12 +189,11 @@ public final class Loader {
         // Just call Class.forName(className) if we are instructed to ignore the TCL.
         if (ignoreTCL) {
             return Class.forName(className);
-        } else {
-            try {
-                return getTCL().loadClass(className);
-            } catch (final Throwable e) {
-                return Class.forName(className);
-            }
+        }
+        try {
+            return getTCL().loadClass(className);
+        } catch (final Throwable e) {
+            return Class.forName(className);
         }
     }
 
@@ -211,9 +210,8 @@ public final class Loader {
 
         if (isChild(loader1, loader2)) {
             return isChild(loader1, loader3) ? loader1 : loader3;
-        } else {
-            return isChild(loader2, loader3) ? loader2 : loader3;
         }
+        return isChild(loader2, loader3) ? loader2 : loader3;
     }
 
     private static boolean isChild(final ClassLoader loader1, final ClassLoader loader2)
{



Mime
View raw message