Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9873

Function result is compared with itself

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.3
    • 6.4, 7.0
    • None
    • None

    Description

      Hi!

      In the method SolrTestCaseJ4.compareSolrDocument

      SolrTestCaseJ4.java
          if(solrDocument1.getFieldNames().size() != solrDocument1.getFieldNames().size()) {
            return false;
          }
      

      "solrDocument1.getFieldNames().size()" compare with itself

      Probably, is should be:

      SolrTestCaseJ4.java
          if(solrDocument1.getFieldNames().size() != solrDocument2.getFieldNames().size()) {
            return false;
          }
      

      This possible defect found by static code analyzer AppChecker

      Attachments

        Activity

          People

            yseeley@gmail.com Yonik Seeley
            AppChecker AppChecker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: