logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501377 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender: AsyncAppender.java db/jdbc/ColumnConfig.java
Date Tue, 09 Jul 2013 16:59:43 GMT
Author: ggregory
Date: Tue Jul  9 16:59:43 2013
New Revision: 1501377

URL: http://svn.apache.org/r1501377
Log:
The expression 'str != null && Boolean.parseBoolean(str)' is the same as just 'Boolean.parseBoolean(str)'
because Boolean.parseBoolean(String) checks for null.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/AsyncAppender.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.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=1501377&r1=1501376&r2=1501377&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 16:59:43 2013
@@ -184,7 +184,7 @@ public final class AsyncAppender<T exten
 
         final boolean isBlocking = blocking == null ? true : Boolean.valueOf(blocking);
         final int queueSize = Integers.parseInt(size, DEFAULT_QUEUE_SIZE);        
-        final boolean isIncludeLocation = includeLocation != null && Boolean.parseBoolean(includeLocation);
+        final boolean isIncludeLocation = Boolean.parseBoolean(includeLocation);
 
         final boolean handleExceptions = suppress == null ? true : Boolean.valueOf(suppress);
 

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java?rev=1501377&r1=1501376&r2=1501377&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/ColumnConfig.java
Tue Jul  9 16:59:43 2013
@@ -111,7 +111,7 @@ public final class ColumnConfig {
 
         final boolean isPattern = pattern != null && pattern.length() > 0;
         final boolean isLiteralValue = literalValue != null && literalValue.length()
> 0;
-        final boolean isEventTimestamp = eventTimestamp != null && Boolean.parseBoolean(eventTimestamp);
+        final boolean isEventTimestamp = Boolean.parseBoolean(eventTimestamp);
         final boolean isUnicode = Strings.isEmpty(unicode) || Boolean.parseBoolean(unicode);
         final boolean isClob = clob != null && Boolean.parseBoolean(clob);
 



Mime
View raw message