From commits-return-1882-apmail-logging-commits-archive=logging.apache.org@logging.apache.org Fri Jan 11 06:20:24 2013 Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7EA29EB69 for ; Fri, 11 Jan 2013 06:20:24 +0000 (UTC) Received: (qmail 58382 invoked by uid 500); 11 Jan 2013 06:20:24 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 58353 invoked by uid 500); 11 Jan 2013 06:20:24 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 58346 invoked by uid 99); 11 Jan 2013 06:20:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 06:20:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 06:20:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E650323889D7; Fri, 11 Jan 2013 06:20:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1431908 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java src/changes/changes.xml Date: Fri, 11 Jan 2013 06:20:03 -0000 To: commits@logging.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130111062003.E650323889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ggregory Date: Fri Jan 11 06:20:03 2013 New Revision: 1431908 URL: http://svn.apache.org/viewvc?rev=1431908&view=rev Log: [LOG4J2-144] NullPointerException in RFC5424Layout. Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java logging/log4j/log4j2/trunk/src/changes/changes.xml 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=1431908&r1=1431907&r2=1431908&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 Fri Jan 11 06:20:03 2013 @@ -475,14 +475,15 @@ public final class RFC5424Layout extends if (charsetName != null) { if (Charset.isSupported(charsetName)) { charset = Charset.forName(charsetName); - } else { - LOGGER.error("Charset " + charsetName + " is not supported for layout, using " + charset.displayName()); - } + } } if (charset == null) { charset = Charset.isSupported("UTF-8") ? Charset.forName("UTF-8") : Charset.defaultCharset(); + if (charsetName != null) { + LOGGER.error("Charset " + charsetName + " is not supported for layout, using " + charset.displayName()); + } } - + if (includes != null && excludes != null) { LOGGER.error("mdcIncludes and mdcExcludes are mutually exclusive. Includes wil be ignored"); includes = null; Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1431908&r1=1431907&r2=1431908&view=diff ============================================================================== --- logging/log4j/log4j2/trunk/src/changes/changes.xml (original) +++ logging/log4j/log4j2/trunk/src/changes/changes.xml Fri Jan 11 06:20:03 2013 @@ -23,6 +23,9 @@ + + NullPointerException in RFC5424Layout. + MessagePatternConverter now returns "null" if the log message is null.