logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1480687 - /logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
Date Thu, 09 May 2013 15:23:19 GMT
Author: ggregory
Date: Thu May  9 15:23:18 2013
New Revision: 1480687

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

Modified:
    logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java

Modified: logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java?rev=1480687&r1=1480686&r2=1480687&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
(original)
+++ logging/log4j/log4j2/trunk/taglib/src/main/java/org/apache/logging/log4j/taglib/LoggerAwareTagSupport.java
Thu May  9 15:23:18 2013
@@ -55,15 +55,14 @@ abstract class LoggerAwareTagSupport ext
     protected final Log4jTaglibLogger getLogger() throws JspException {
         if (this.logger != null) {
             return TagUtils.resolveLogger(this.loggerContext, this.logger, null);
-        } else {
-            Log4jTaglibLogger logger = TagUtils.getDefaultLogger(this.pageContext);
-            if (logger == null) {
-                String name = this.pageContext.getPage().getClass().getName();
-                logger = TagUtils.resolveLogger(this.loggerContext, name, null);
-                TagUtils.setDefaultLogger(this.pageContext, logger);
-            }
-            return logger;
         }
+        Log4jTaglibLogger logger = TagUtils.getDefaultLogger(this.pageContext);
+        if (logger == null) {
+            String name = this.pageContext.getPage().getClass().getName();
+            logger = TagUtils.resolveLogger(this.loggerContext, name, null);
+            TagUtils.setDefaultLogger(this.pageContext, logger);
+        }
+        return logger;
     }
 
     public final void setLogger(Object logger) {



Mime
View raw message