[
https://issues.apache.org/jira/browse/LUCENE-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13712709#comment-13712709
]
David Smiley commented on LUCENE-460:
-------------------------------------
With some time (and thanks to your help) I'm learning *what* it is doing but it
takes more to know *why*, making it hard to judge how to add in a couple more
integers into the existing hashCode. Well... as I've been spending more time
investigating, I'm feeling a more comfortable. I would certainly prefer to see
Integer.rotateLeft(31).
I argue for the more maintainable code -- and that's IntelliJ's version. I
also like that it uses super.hashCode(), which leaves the responsibility of
including the hashcode of boost, which is where that responsibility should lie.
Of course the approaches are complementary.
_More generally_, I'm looking to see if it would be bad form of me to outright
replace a hashCode (or equals) method if it suited me, without feeling obliged
to consult who coded it in the first place.
> hashCode improvements
> ---------------------
>
> Key: LUCENE-460
> URL: https://issues.apache.org/jira/browse/LUCENE-460
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Reporter: Yonik Seeley
> Assignee: Yonik Seeley
> Priority: Minor
>
> It would be nice for all Query classes to implement hashCode and equals to
> enable them to be used as keys when caching.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]