Updated hashcode/equals to test all fields

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@583305 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Harwood 2007-10-09 21:40:45 +00:00
parent ceebb95d63
commit 3872d3bfcc
1 changed files with 2 additions and 0 deletions

View File

@ -215,6 +215,7 @@ public class DuplicateFilter extends Filter
return false;
DuplicateFilter other = (DuplicateFilter)obj;
return keepMode == other.keepMode &&
processingMode == other.processingMode &&
(fieldName == other.fieldName || (fieldName != null && fieldName.equals(other.fieldName)));
}
@ -224,6 +225,7 @@ public class DuplicateFilter extends Filter
{
int hash = 217;
hash = 31 * hash + keepMode;
hash = 31 * hash + processingMode;
hash = 31 * hash + fieldName.hashCode();
return hash;
}