Uploaded image for project: 'Chukwa (retired)'
  1. Chukwa (retired)
  2. CHUKWA-463

Improve pattern for getTag() method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Data Processors
    • None

    Description

      The current pattern used for extracting tags from the tags field:

      Pattern tagPattern = Pattern.compile("."tagName"=\"(.?)\".*");

      Doesn't work very well. If you pass tagName "bar", will also match (and return) the content of foobar="dssad" tag.

      The proposed path is more correct, and also faster than using .*

      Attachments

        1. fixpat.patch
          0.6 kB
          Ariel Shemaiah Rabkin
        2. improve_tags_pattern.diff
          0.8 kB
          Guille -bisho-
        3. improve_tags_pattern-v2.diff
          0.9 kB
          Guille -bisho-

        Activity

          People

            asrabkin Ariel Shemaiah Rabkin
            bisho Guille -bisho-
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: