logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501388 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
Date Tue, 09 Jul 2013 17:17:15 GMT
Author: ggregory
Date: Tue Jul  9 17:17:15 2013
New Revision: 1501388

URL: http://svn.apache.org/r1501388
Log:
Refactor duplicate code in a new API Boolean.parseBoolean(String, boolean), which also checks
for empty strings in addition to nulls.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java?rev=1501388&r1=1501387&r2=1501388&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
Tue Jul  9 17:17:15 2013
@@ -183,7 +183,7 @@ public final class AsyncAppender<T exten
             LOGGER.error("No appender references provided to AsyncAppender {}", name);
         }
 
-        final boolean isBlocking = blocking == null ? true : Boolean.parseBoolean(blocking);
+        final boolean isBlocking = Booleans.parseBoolean(blocking, true);
         final int queueSize = Integers.parseInt(size, DEFAULT_QUEUE_SIZE);        
         final boolean isIncludeLocation = Boolean.parseBoolean(includeLocation);
         final boolean handleExceptions = Booleans.parseBoolean(suppress, true);



Mime
View raw message