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

Log4jMarker#contains(String) does not respect org.slf4j.Marker contract

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • SLF4J Bridge
    • None

    Description

      Expected behavior
      ==============
      'org.apache.logging.slf4j.Log4jMarker' implements 'org.slf4j.Marker'.

      'org.slf4j.Marker#contains(String name)' contract states that: "If 'name' is null the returned value is always false."
      http://www.slf4j.org/apidocs/org/slf4j/Marker.html#contains%28java.lang.String%29

      Actual behavior
      =============
      'org.apache.logging.slf4j.Log4jMarker#contains(final String name)' throws 'IllegalArgumentException' if 'name' is null

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            nikelblue Daniel Branzea
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment