logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1501440 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout: HTMLLayout.java RFC5424Layout.java SyslogLayout.java XMLLayout.java
Date Tue, 09 Jul 2013 18:29:03 GMT
Author: ggregory
Date: Tue Jul  9 18:29:02 2013
New Revision: 1501440

URL: http://svn.apache.org/r1501440
Log:
Remove wasted boxing and unboxing.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java?rev=1501440&r1=1501439&r2=1501440&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/HTMLLayout.java
Tue Jul  9 18:29:02 2013
@@ -325,7 +325,7 @@ public final class HTMLLayout extends Ab
         final FontSize fs = FontSize.getFontSize(fontSize);
         fontSize = fs.getFontSize();
         final String headerSize = fs.larger().getFontSize();
-        final boolean info = locationInfo == null ? false : Boolean.valueOf(locationInfo);
+        final boolean info = locationInfo == null ? false : Boolean.parseBoolean(locationInfo);
         if (title == null) {
             title = DEFAULT_TITLE;
         }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java?rev=1501440&r1=1501439&r2=1501440&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
Tue Jul  9 18:29:02 2013
@@ -554,8 +554,8 @@ public final class RFC5424Layout extends
         }
         final Facility f = Facility.toFacility(facility, Facility.LOCAL0);
         final int enterpriseNumber = Integers.parseInt(ein, DEFAULT_ENTERPRISE_NUMBER);
-        final boolean isMdc = includeMDC == null ? true : Boolean.valueOf(includeMDC);
-        final boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);
+        final boolean isMdc = includeMDC == null ? true : Boolean.parseBoolean(includeMDC);
+        final boolean includeNewLine = includeNL == null ? false : Boolean.parseBoolean(includeNL);
         final Map<String, String> loggerFieldValues = loggerFields == null ? null :
loggerFields.getMap();
         if (mdcId == null) {
             mdcId = DEFAULT_MDCID;

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java?rev=1501440&r1=1501439&r2=1501440&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
Tue Jul  9 18:29:02 2013
@@ -157,7 +157,7 @@ public class SyslogLayout extends Abstra
                                             @PluginAttr("newLineEscape") final String escapeNL,
                                             @PluginAttr("charset") final String charsetName)
{
         final Charset charset = Charsets.getSupportedCharset(charsetName);
-        final boolean includeNewLine = includeNL == null ? false : Boolean.valueOf(includeNL);
+        final boolean includeNewLine = includeNL == null ? false : Boolean.parseBoolean(includeNL);
         final Facility f = Facility.toFacility(facility, Facility.LOCAL0);
         return new SyslogLayout(f, includeNewLine, escapeNL, charset);
     }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java?rev=1501440&r1=1501439&r2=1501440&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
Tue Jul  9 18:29:02 2013
@@ -282,9 +282,9 @@ public class XMLLayout extends AbstractS
                                          @PluginAttr("complete") final String complete,
                                          @PluginAttr("charset") final String charsetName)
{
         final Charset charset = Charsets.getSupportedCharset(charsetName, Charsets.UTF_8);
-        final boolean info = locationInfo == null ? false : Boolean.valueOf(locationInfo);
-        final boolean props = properties == null ? false : Boolean.valueOf(properties);
-        final boolean comp = complete == null ? false : Boolean.valueOf(complete);
+        final boolean info = locationInfo == null ? false : Boolean.parseBoolean(locationInfo);
+        final boolean props = properties == null ? false : Boolean.parseBoolean(properties);
+        final boolean comp = complete == null ? false : Boolean.parseBoolean(complete);
         return new XMLLayout(info, props, comp, charset);
     }
 }



Mime
View raw message