[
https://issues.apache.org/jira/browse/LUCENE-3554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143389#comment-13143389
]
Robert Muir commented on LUCENE-3554:
-------------------------------------
{quote}
...but TokenStream (via AttributeSource) already has equals+hashCode methods
that aren't just inherited from Object – are they doing this stream consumption?
{quote}
Only at that 'state' in time. You would have to walk the tokenstreams in
parallel, verifying equals() along the way, and ensure # of tokens is the same
to verify that two tokenstreams are 'equal'.
{quote}
if they are, that seems like a bug (TokenStream should probably override
AttributeSource to use "==" and System.identiyHashCode, right?)
{quote}
No, because it works fine for that stream at that moment in time.
{quote}
That seems like an orthogonal issue to whether AbstractField/Field/NumericField
could have useful equals/hashCode methods
{quote}
Not at all, because fields can be set by tokenstreams, equals/hashcode would be
broken if we did this.
broken != useful.
> AbstractField / Field / NumericField do not override equals and hashcode
> methods
> --------------------------------------------------------------------------------
>
> Key: LUCENE-3554
> URL: https://issues.apache.org/jira/browse/LUCENE-3554
> Project: Lucene - Java
> Issue Type: Wish
> Components: core/index
> Reporter: Alexandre Dupriez
> Priority: Minor
> Original Estimate: 1h 55m
> Remaining Estimate: 1h 55m
>
> Field, NumericField and AbstractField implementations of Fieldable do not
> override equals and hashcode methods and cannot be compared as such.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]