[slf4j-dev] svn commit: r483 - slf4j/trunk/src/java/org/slf4j/impl

ceki at slf4j.org ceki at slf4j.org
Mon Jan 9 17:53:00 CET 2006


Author: ceki
Date: Mon Jan  9 17:52:59 2006
New Revision: 483

Modified:
   slf4j/trunk/src/java/org/slf4j/impl/SimpleLogger.java
Log:

Remove superflous message.toString() call which made SimpleLogger vulnerable to null input.


Modified: slf4j/trunk/src/java/org/slf4j/impl/SimpleLogger.java
==============================================================================
--- slf4j/trunk/src/java/org/slf4j/impl/SimpleLogger.java	(original)
+++ slf4j/trunk/src/java/org/slf4j/impl/SimpleLogger.java	Mon Jan  9 17:52:59 2006
@@ -234,7 +234,7 @@
    * Log a message of level INFO, including an exception.
    */
   public void info(String msg, Throwable t) {
-    log(INFO_STR, msg.toString(), t);
+    log(INFO_STR, msg, t);
   }
 
   /**
@@ -249,7 +249,7 @@
    * to the format outlined above.
   */
   public void warn(String msg) {
-    log(WARN_STR, msg.toString(), null);
+    log(WARN_STR, msg, null);
   }
 
   /**
@@ -280,7 +280,7 @@
    * Log a message of level WARN, including an exception.
    */
   public void warn(String msg, Throwable t) {
-    log(WARN_STR, msg.toString(), t);
+    log(WARN_STR, msg, t);
   }
 
   /**
@@ -295,7 +295,7 @@
    * to the format outlined above.
    */
   public void error(String msg) {
-    log(ERROR_STR, msg.toString(), null);
+    log(ERROR_STR, msg, null);
   }
 
   /**
@@ -327,7 +327,7 @@
    * Log a message of level ERROR, including an exception.
    */
   public void error(String msg, Throwable t) {
-    log(ERROR_STR, msg.toString(), t);
+    log(ERROR_STR, msg, t);
   }
 
 }



More information about the slf4j-dev mailing list