http://bugzilla.slf4j.org/show_bug.cgi?id=12

           Summary: NullPointerException in SLF4JLog.java (jcl104-over-
                    slf4j.jar)
           Product: SLF4J
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P5
         Component: Implementations
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Apache commons-logging replacement (jcl104-over-slf4j.jar)
throws a NPE on line 97 and others lines that rely on message parameter
to be non-null.

  public void debug(Object message) {
    logger.debug(message.toString());
  }

NPE occurs when the object passed into the logger is null.
Some struts tag libraries seems to be passing in null.

Suggest test the following change

  private String messageString (Object message) {
    return message==null?message.toString():"";
  }

  public void debug(Object message) {
    logger.debug(messageString(message));
  }



Without this, I cannot fully replace commons-logging out from my app.

-- 
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.
_______________________________________________
dev mailing list
[email protected]
http://slf4j.org/mailman/listinfo/dev

Reply via email to