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

NullPointerException in MapLookup.lookup is the event is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.4.1, 2.5
    • Fix Version/s: 2.6
    • Component/s: Core
    • Labels:
      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

            • Assignee:
              jvz Matt Sicker
              Reporter:
              olemasle Olivier Lemasle
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: