You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Carter Kozak (JIRA)" <ji...@apache.org> on 2018/04/17 18:20:00 UTC

[jira] [Created] (LOG4J2-2320) AbstractLogger NPE hides actual cause when getFormat returns null

Carter Kozak created LOG4J2-2320:
------------------------------------

             Summary: AbstractLogger NPE hides actual cause when getFormat returns null
                 Key: LOG4J2-2320
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2320
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.11.0
            Reporter: Carter Kozak


NPE on Message.getFormat().length()
{noformat}
java.lang.NullPointerException: null
        at org.apache.logging.log4j.spi.AbstractLogger.handleLogMessageException(AbstractLogger.java:2184) ~[log4j-api-2.11.0.jar:2.11.0]
        at org.apache.logging.log4j.spi.AbstractLogger.tryLogMessage(AbstractLogger.java:2173) ~[log4j-api-2.11.0.jar:2.11.0]
        at org.apache.logging.log4j.spi.AbstractLogger.logMessageTrackRecursion(AbstractLogger.java:2125) ~[log4j-api-2.11.0.jar:2.11.0]
        at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2108) ~[log4j-api-2.11.0.jar:2.11.0]
        at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1827) ~[log4j-api-2.11.0.jar:2.11.0]
        at org.apache.logging.log4j.spi.AbstractLogger.trace(AbstractLogger.java:2272) ~[log4j-api-2.11.0.jar:2.11.0]{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)