You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/03/05 10:07:38 UTC

[jira] [Commented] (LUCENE-6333) Clean up overridden .equals and .hashCode methods in Query subclasses

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

Adrien Grand commented on LUCENE-6333:
--------------------------------------

Thanks Lee, the patch looks good to me. I'll commit it later today if there are no objections.

> Clean up overridden .equals and .hashCode methods in Query subclasses
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-6333
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6333
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: 5.0
>            Reporter: Lee Hinman
>            Priority: Minor
>         Attachments: LUCENE-6333.patch
>
>
> As a followup to LUCENE-6304, all classes that subclass Query and override the {{equals}} and {{hashCode}} methods should call super.equals/hashCode and, when possible, not override the methods at all.
> For example, TermQuery.hashCode overrides the Query.hashCode, but will be exactly the same code once LUCENE-6304 is merged.



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

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