[
https://issues.apache.org/jira/browse/LUCENE-8261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16445935#comment-16445935
]
Steve Rowe commented on LUCENE-8261:
------------------------------------
bq. Very likely true. But should it be allowed? If we quoted the replacement it
would fail with a more reasonable error later on (unresolved property)?
I'm not sure if it would be more reasonable; as I said, I think the appropriate
place to inform people about this problem is in validation (forms of which
already occur with {{ant precommit}}) - that would maximize reasonableness.
bq. Alternatively, we could resolve it recursively too (catching cycles), but
it'd be more difficult to implement.
Yeah, I've considered implementing it, but this is such a niche functionality,
and as I said, so rarely even asked for, that I haven't done anything about it.
> InterpolatedProperties.interpolate should quote the replacement
> ---------------------------------------------------------------
>
> Key: LUCENE-8261
> URL: https://issues.apache.org/jira/browse/LUCENE-8261
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Trivial
> Attachments: LUCENE-8261.patch
>
>
> InterpolatedProperties is used in lib check tasks in the build file. I
> occasionally see this:
> {code}
> /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)
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]