logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501386 - /logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
Date Tue, 09 Jul 2013 17:14:01 GMT
Author: ggregory
Date: Tue Jul  9 17:14:00 2013
New Revision: 1501386

URL: http://svn.apache.org/r1501386
Log:
The pattern '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/test/java/org/apache/logging/log4j/test/appender/ListAppender.java

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java?rev=1501386&r1=1501385&r2=1501386&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/test/appender/ListAppender.java
Tue Jul  9 17:14:00 2013
@@ -165,8 +165,8 @@ public class ListAppender<T extends Seri
             return null;
         }
 
-        final boolean nl = newLine != null && Boolean.parseBoolean(newLine);
-        final boolean r = raw != null && Boolean.parseBoolean(raw);
+        final boolean nl = Boolean.parseBoolean(newLine);
+        final boolean r = Boolean.parseBoolean(raw);
 
         return new ListAppender<S>(name, filter, layout, nl, r);
     }



Mime
View raw message