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

NameAbbreviator creates temporary objects

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Pattern Converters
    • Labels:
      None

      Description

      PatternLayout's NamePatternConverter and ClassNamePatternConverter delegate to NameAbbreviator.

      The current API that NameAbbreviator supports is

      String abbreviate(String original)
      

      This creates temporary objects. However, the clients of NameAbbreviator already have a StringBuilder to write into. I propose to modify the NameAbbreviator API to this:

      void abbreviate(String original, StringBuilder destination)
      

        Attachments

          Activity

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              remkop@yahoo.com Remko Popma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: