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

Add with(String, primitive) methods to org.apache.logging.log4j.message.MapMessage

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0
    • None
    • None

    Description

      Add with() methods for primitives and Object:

      • with(String, boolean)
      • with(String, byte)
      • with(String, char)
      • with(String, double)
      • with(String, float)
      • with(String, int)
      • with(String, long)
      • with(String, Object)
      • with(String, short)

      This one already exists:

      • with(String, String)

      This parallels what you can do with a JMS MapMessage.

      The following protected methods have also been added:

      • validate(String, boolean)
      • validate(String, byte)
      • validate(String, char)
      • validate(String, double)
      • validate(String, float)
      • validate(String, int)
      • validate(String, long)
      • validate(String, Object)
      • validate(String, short)

      The method validate(String, String) already exists.

      In 2.8.2, MapMessage managed a Map<String, String>.

      In 2.9:

      • MapMessage is now declared with generics to define what kind of values are managed.
      • The new Subclass StringMapMessage is typed specifically to deal with String values.

      The StringMapMessage class does not perform any type conversion or checks.

      Attachments

        Issue Links

        Activity

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

          People

            ggregory Gary D. Gregory
            ggregory Gary D. Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment