[slf4j-dev] [Bug 12] NullPointerException in SLF4JLog.java (jcl104-over-slf4j.jar)
bugzilla-daemon at gil.qos.ch
bugzilla-daemon at gil.qos.ch
Sun Jan 8 21:21:07 CET 2006
http://bugzilla.slf4j.org/show_bug.cgi?id=12
boris.unckel.mlg at gmx.net changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version|Windows XP |All
------- Additional Comments From boris.unckel.mlg at gmx.net 2006-01-08 21:21 -------
(In reply to comment #0)
> Suggest test the following change
>
> private String messageString (Object message) {
> return message==null?message.toString():"";
> }
>
> public void debug(Object message) {
> logger.debug(messageString(message));
> }
There is another possibility. In the current trunk version (and prior release
versions) each wrapper in JCL has a different behaviour:
Some do
String.valueOf(message);
some do
if (message == null) {
return;
}
This has to be specified in the o.a.c.l.Log interface.
I suggest String.valueOf, because an underlying log system may
detected location information and you can check the code why null
is passed.
See
http://issues.apache.org/bugzilla/show_bug.cgi?id=38174
for details.
--
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the slf4j-dev
mailing list