Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8261

InterpolatedProperties.interpolate and recursive property references

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      InterpolatedProperties is used in lib check tasks in the build file. I occasionally see this:

      /home/jenkins/workspace/Lucene-Solr-master-Linux/lucene/tools/custom-tasks.xml:108: java.lang.IllegalArgumentException: named capturing group is missing trailing '}'
              at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1052)
              at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:908)
              at org.apache.lucene.dependencies.InterpolatedProperties.interpolate(InterpolatedProperties.java:64)
      

      I don't think we ever need to use any group references in those replacements; they should be fixed strings (quoted verbatim)? So Pattern.quoteReplacement would be adequate here.

        Attachments

        1. LUCENE-8261.patch
          6 kB
          Dawid Weiss
        2. LUCENE-8261.patch
          0.8 kB
          Dawid Weiss

          Activity

            People

            • Assignee:
              dweiss Dawid Weiss
              Reporter:
              dweiss Dawid Weiss
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: