Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7280

Avoid unnecessary string allocation in IOUtils::toString

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 3.1.11, 3.2.0
    • None
    • None
    • Novice

    Description

      When buidling up the string representation, currently the array of read characters is copied into a string before being appended to the string buffer. With a stringbuilder it can take a char array and copy directly into it's internal buffer, avoiding the intermediate string.

      *first contribution to this, or any Apache project, so not sure if this needs to be categorised better.

      Attachments

        Issue Links

          Activity

            People

              coheigea Colm O hEigeartaigh
              stevencrockett Steven Crockett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: