Fix stackoverflow error on InternalNumericMetricAggregation

This commit is contained in:
Colin Goodheart-Smithe 2016-12-22 13:50:54 +00:00
parent 9b3b693d15
commit 9a73a2efb3
1 changed files with 8 additions and 2 deletions

View File

@ -105,12 +105,18 @@ public abstract class InternalNumericMetricsAggregation extends InternalMetricsA
} }
@Override @Override
protected int doHashCode() { public int hashCode() {
return Objects.hash(format, super.hashCode()); return Objects.hash(format, super.hashCode());
} }
@Override @Override
protected boolean doEquals(Object obj) { public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj.getClass() != getClass()) {
return false;
}
InternalNumericMetricsAggregation other = (InternalNumericMetricsAggregation) obj; InternalNumericMetricsAggregation other = (InternalNumericMetricsAggregation) obj;
return super.equals(obj) && return super.equals(obj) &&
Objects.equals(format, other.format); Objects.equals(format, other.format);