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

Uwe Schindler edited comment on LUCENE-7818 at 5/7/17 11:12 AM:
----------------------------------------------------------------

Already listed: LUCENE-5365


was (Author: sarkaramr...@gmail.com):
Already listed: https://issues.apache.org/jira/browse/LUCENE-5365

> Suspicious condition
> --------------------
>
>                 Key: LUCENE-7818
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7818
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/queryparser
>    Affects Versions: 6.5
>            Reporter: AppChecker
>              Labels: static-analysis
>
> Hi
> Please, look this [code 
> fragment:|https://github.com/apache/lucene-solr/blob/e2521b2a8baabdaf43b92192588f51e042d21e97/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/QueryNodeOperation.java#L57-L60]
> {code}
>     else if (q1 instanceof AndQueryNode)
>       op = ANDOperation.Q1;
>     else if (q1 instanceof AndQueryNode)
>       op = ANDOperation.Q2;
> {code}
> (q1 instanceof AndQueryNode) is checked twice.
> Probably it should be:
> {code}
>     else if (q1 instanceof AndQueryNode)
>       op = ANDOperation.Q1;
>     else if (q2 instanceof AndQueryNode)
>       op = ANDOperation.Q2;
> {code}
> This possible defect found by 
> [AppChecker|https://npo-echelon.ru/en/solutions/appchecker.php]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to