lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9300) fix replace expression in GetMavenDependenciesTask's dependencyToArtifactId method.
Date Wed, 13 Jul 2016 16:14:20 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375281#comment-15375281
] 

ASF subversion and git services commented on SOLR-9300:
-------------------------------------------------------

Commit 1e92fc5f35aedd27b9f57e259e241e560d666515 in lucene-solr's branch refs/heads/master
from [~cpoerschke]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=1e92fc5 ]

SOLR-9300: fix replace expression in GetMavenDependenciesTask's dependencyToArtifactId (Christine
Poerschke, Daniel Collins)


> 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


Mime
View raw message