logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501484 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java
Date Tue, 09 Jul 2013 19:33:32 GMT
Author: ggregory
Date: Tue Jul  9 19:33:32 2013
New Revision: 1501484

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

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java?rev=1501484&r1=1501483&r2=1501484&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCAppender.java
Tue Jul  9 19:33:32 2013
@@ -74,8 +74,8 @@ public final class JDBCAppender extends 
                                               @PluginAttr("tableName") final String tableName,
                                               @PluginElement("columnConfigs") final ColumnConfig[]
columnConfigs) {
 
-        int bufferSizeInt = AbstractAppender.parseInt(bufferSize, 0);
-        final boolean handleExceptions = suppressExceptions == null || !Boolean.parseBoolean(suppressExceptions);
+        final int bufferSizeInt = AbstractAppender.parseInt(bufferSize, 0);
+        final boolean handleExceptions = !Boolean.parseBoolean(suppressExceptions);
 
         final StringBuilder managerName = new StringBuilder("jdbcManager{ description=").append(name)
                 .append(", bufferSize=").append(bufferSizeInt).append(", connectionSource=")



Mime
View raw message