diff --git a/src/java/org/apache/lucene/analysis/TokenStream.java b/src/java/org/apache/lucene/analysis/TokenStream.java index 16d7b37a4f7..168fdf44d23 100644 --- a/src/java/org/apache/lucene/analysis/TokenStream.java +++ b/src/java/org/apache/lucene/analysis/TokenStream.java @@ -146,6 +146,10 @@ public abstract class TokenStream extends AttributeSource { } return false; } + + public int hashCode() { + return delegate.hashCode() ^ 0x0a45ff31; + } } /** diff --git a/src/test/org/apache/lucene/search/CachingWrapperFilterHelper.java b/src/test/org/apache/lucene/search/CachingWrapperFilterHelper.java index 7019e79f155..d13f05a2493 100644 --- a/src/test/org/apache/lucene/search/CachingWrapperFilterHelper.java +++ b/src/test/org/apache/lucene/search/CachingWrapperFilterHelper.java @@ -77,4 +77,8 @@ public class CachingWrapperFilterHelper extends CachingWrapperFilter { if (!(o instanceof CachingWrapperFilterHelper)) return false; return this.filter.equals((CachingWrapperFilterHelper)o); } + + public int hashCode() { + return this.filter.hashCode() ^ 0x5525aacb; + } }