Christine Poerschke created SOLR-9300:
-----------------------------------------
Summary: fix replace expression in GetMavenDependenciesTask's
dependencyToArtifactId method.
Key: SOLR-9300
URL: https://issues.apache.org/jira/browse/SOLR-9300
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Reporter: Christine Poerschke
Assignee: Christine Poerschke
Priority: Minor
Fix replace expression in GetMavenDependenciesTask's dependencyToArtifactId
method. (Christine Poerschke, Daniel Collins)
One line {{replace}} vs. {{replaceAll}} in
[GetMavenDependenciesTask.java|https://github.com/apache/lucene-solr/blob/master/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java#L643]
since [String
replace|https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replace-java.lang.CharSequence-java.lang.CharSequence-]
takes the CharSequence (or char) literally and [String
replaceAll|https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replaceAll-java.lang.String-java.lang.String-]
(or replaceFirst) takes a regular expression such a {{"(?<!solr-)analysis-"}}.
(As an aside, in case anyone else is also wondering about the meaning of
{{(?<!solr-)}} in the expression, the
[Pattern|https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html]
javadocs list a special construct {{(?<!X)}} as
bq.X, via zero-width negative lookbehind
and the [Lookahead and Lookbehind Zero-Length
Assertions|http://www.regular-expressions.info/lookaround.html] tutorial helped
us understand the meaning of that list entry.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]