Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5398

Optimize String.replaceAll() to cache Patterns where suitable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.15.1, 2.16.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      Inspired by issue [1] regarding performance of JMS headers, I performed a little search in IDE and found out that there's pretty much not optimized String.replaceAll() calls.

      I think it will be good to search the code base for such calls again and replace them with references to the static pre-compiled java.util.regex.Patterns. Of course if such action makes sense (like in StringHelper#removeQuotes()).

      [1] https://issues.apache.org/jira/browse/CAMEL-5396

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              hekonsek Henryk Konsek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: