You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Christine Poerschke (JIRA)" <ji...@apache.org> on 2016/07/13 11:30:21 UTC

[jira] [Updated] (SOLR-9300) fix replace expression in GetMavenDependenciesTask's dependencyToArtifactId method.

     [ https://issues.apache.org/jira/browse/SOLR-9300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christine Poerschke updated SOLR-9300:
--------------------------------------
    Attachment: SOLR-9300.patch

> 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
>         Attachments: SOLR-9300.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org