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

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

Commit dcf202a95813d72b1fd56daa7e30cbf413b891b9 in lucene-solr's branch 
refs/heads/feature/metrics from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=dcf202a ]

SOLR-9873: tests - fix SolrTestCaseJ4.compareSolrDocument num fields comparison


> Function result is compared with itself
> ---------------------------------------
>
>                 Key: SOLR-9873
>                 URL: https://issues.apache.org/jira/browse/SOLR-9873
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.3
>            Reporter: AppChecker
>            Assignee: Yonik Seeley
>            Priority: Minor
>             Fix For: master (7.0), 6.4
>
>
> Hi!
> In the method 
> [SolrTestCaseJ4.compareSolrDocument|https://github.com/apache/lucene-solr/blob/c9522a393661c8878d488ad4475ac7e2cbb9c25c/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java#L1951]
> {code:title=SolrTestCaseJ4.java|borderStyle=solid}
>     if(solrDocument1.getFieldNames().size() != 
> solrDocument1.getFieldNames().size()) {
>       return false;
>     }
> {code}
> "solrDocument1.getFieldNames().size()" compare with itself
> Probably, is should be:
> {code:title=SolrTestCaseJ4.java|borderStyle=solid}
>     if(solrDocument1.getFieldNames().size() != 
> solrDocument2.getFieldNames().size()) {
>       return false;
>     }
> {code}
> This possible defect found by [static code analyzer 
> AppChecker|http://cnpo.ru/en/solutions/appchecker.php]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to