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

Avoid unnecessary string allocation in IOUtils::toString

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.11, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: