[PR #1] Removing the equals and hashcode methods

This commit is contained in:
Guillaume Polaert 2017-05-02 12:07:33 +02:00
parent 9e2a9fd309
commit 5e434473b0
2 changed files with 0 additions and 39 deletions

View File

@ -152,26 +152,4 @@ public class DDSpanContext implements io.opentracing.SpanContext {
+ ", parentId=" + parentId + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (spanId ^ (spanId >>> 32));
result = prime * result + (int) (traceId ^ (traceId >>> 32));
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
DDSpanContext other = (DDSpanContext) obj;
if (spanId != other.spanId)
return false;
return traceId == other.traceId;
}
}

View File

@ -229,23 +229,6 @@ public class DDTracer implements io.opentracing.Tracer {
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DDTracer ddTracer = (DDTracer) o;
if (writer != null ? !writer.equals(ddTracer.writer) : ddTracer.writer != null) return false;
return sampler != null ? sampler.equals(ddTracer.sampler) : ddTracer.sampler == null;
}
@Override
public int hashCode() {
int result = writer != null ? writer.hashCode() : 0;
result = 31 * result + (sampler != null ? sampler.hashCode() : 0);
return result;
}
@Override
public String toString() {