Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1227

NullPointerException in MapLookup.lookup is the event is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4, 2.4.1, 2.5
    • 2.6
    • Core
    • None

    Description

      A NullPointerException is thrown in org.apache.logging.log4j.core.lookup.MapLookup.lookup, when the event is null and the map is not null.

      The event can indeed be null, for example if used from StrSubstitutor, with the method replace(final StringBuilder source).

      Exception:

      java.lang.NullPointerException: null
      at org.apache.logging.log4j.core.lookup.MapLookup.lookup(MapLookup.java:121)

      Attachments

        Activity

          People

            mattsicker Matt Sicker
            olemasle Olivier Lemasle
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: