Marc Breslow created SOLR-8594:
----------------------------------

             Summary: Impossible Cast: equals() method in ConstDoubleSource 
always returns false
                 Key: SOLR-8594
                 URL: https://issues.apache.org/jira/browse/SOLR-8594
             Project: Solr
          Issue Type: Bug
            Reporter: Marc Breslow


The equals() method in 
org.apache.solr.analytics.util.valuesource.ConstDoubleSource is written as
{code:java}
  public boolean equals(Object o) {
    if (!(o instanceof ConstValueSource)) return false;
    ConstDoubleSource other = (ConstDoubleSource)o;
    return  this.constant == other.constant;
  }
{code}

There is no common ancestor for ConstValueSource so the first conditional will 
always return false. Attaching a patch to fix.



--
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