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

InterpolatedProperties.interpolate and recursive property references

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 7.4
    • None
    • None
    • 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
          0.8 kB
          Dawid Weiss
        2. LUCENE-8261.patch
          6 kB
          Dawid Weiss

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: