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

Remove Pattern.compile usages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.20.0
    • camel-core
    • None
    • Novice

    Description

      Please heck Pattern.compile usage across Camel source code - also not direct usage.

      For example:
      Whenever one of these methods are used from String class a Pattern.compile() is utilized:

      • matches
      • replaceFirst
      • replaceAll
      • replace
      • split: has an optimization and for certain characters it doesn’t use Pattern.compile.

      For example:
      GenericFileConsumer.isMatched calls name.matches(endpoint.getExclude())
      GenericFileEndpoint could contain also excludePattern as well.

      Possible solution:
      Walk through the code and replace usages of these methods with static Pattern variables.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              matihost Mateusz Nowakowski
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: