logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1391622 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
Date Fri, 28 Sep 2012 19:58:46 GMT
Author: ggregory
Date: Fri Sep 28 19:58:46 2012
New Revision: 1391622

URL: http://svn.apache.org/viewvc?rev=1391622&view=rev
Log:
Make toString() fully null-safe.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1391622&r1=1391621&r2=1391622&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/Logger.java
Fri Sep 28 19:58:46 2012
@@ -347,7 +347,7 @@ public class Logger extends AbstractLogg
      * Returns a String representation of this instance in the form {@code "name:level[ in
context_name]"}.
      */
     public String toString() {
-        final String nameLevel = name + ":" + getLevel();
+        final String nameLevel = "" + name + ":" + getLevel();
         if (context == null) {
             return nameLevel;
         }



Mime
View raw message