AppChecker created SOLR-9873:
--------------------------------
Summary: 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
Priority: Minor
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]