Removed forcedDateParser from hashCode() and equals() as it holds no value when it comes to equality.

This commit is contained in:
Martijn van Groningen 2015-07-03 10:04:22 +02:00
parent 20d0b4f446
commit 13602a591f
1 changed files with 1 additions and 2 deletions

View File

@ -224,8 +224,8 @@ public class DateFieldMapper extends NumberFieldMapper {
if (lowerTerm != null ? !lowerTerm.equals(that.lowerTerm) : that.lowerTerm != null) return false;
if (upperTerm != null ? !upperTerm.equals(that.upperTerm) : that.upperTerm != null) return false;
if (timeZone != null ? !timeZone.equals(that.timeZone) : that.timeZone != null) return false;
return !(forcedDateParser != null ? !forcedDateParser.equals(that.forcedDateParser) : that.forcedDateParser != null);
return true;
}
@Override
@ -236,7 +236,6 @@ public class DateFieldMapper extends NumberFieldMapper {
result = 31 * result + (includeLower ? 1 : 0);
result = 31 * result + (includeUpper ? 1 : 0);
result = 31 * result + (timeZone != null ? timeZone.hashCode() : 0);
result = 31 * result + (forcedDateParser != null ? forcedDateParser.hashCode() : 0);
return result;
}