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

Uwe Schindler commented on LUCENE-1831:
---------------------------------------

This class is used internally only. There is no need for hashCode(), the equals 
is only needed for TeeSinkTokenStream, that compares the attribute factories. 
Normally, factories are singletons, but this special case needs the extra 
equals check because two wrapper factories are equal if the inner delegate is 
equal.

> TokenWrapperAttributeFactory, CachingWrapperFilterHelper implements equals 
> and so should also implement hashCode
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-1831
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1831
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Analysis
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 2.9
>
>
> its part of the contract of Object 
> bq. If two objects are equal according to the equals(Object) method, then 
> calling the hashCode method on each of the two objects must produce the same 
> integer result.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to