mirror of https://github.com/apache/lucene.git
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:
parent
2407024b5a
commit
d3cb8b3dbc
|
@ -146,6 +146,10 @@ public abstract class TokenStream extends AttributeSource {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int hashCode() {
|
||||||
|
return delegate.hashCode() ^ 0x0a45ff31;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue