LUCENE-1831: TokenWrapperAttributeFactory, CachingWrapperFilterHelper implements equals and so should also implement hashCode

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@806381 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2009-08-20 22:24:21 +00:00
parent 2407024b5a
commit d3cb8b3dbc
2 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,10 @@ public abstract class TokenStream extends AttributeSource {
} }
return false; return false;
} }
public int hashCode() {
return delegate.hashCode() ^ 0x0a45ff31;
}
} }
/** /**

View File

@ -77,4 +77,8 @@ public class CachingWrapperFilterHelper extends CachingWrapperFilter {
if (!(o instanceof CachingWrapperFilterHelper)) return false; if (!(o instanceof CachingWrapperFilterHelper)) return false;
return this.filter.equals((CachingWrapperFilterHelper)o); return this.filter.equals((CachingWrapperFilterHelper)o);
} }
public int hashCode() {
return this.filter.hashCode() ^ 0x5525aacb;
}
} }