mirror of https://github.com/grpc/grpc-java.git
Fix equality and hashcode of CancelServerStreamCommand. (#11785)
In e036b1b198
, CancelServerStreamCommand got another field. But, its hashCode and equals methods were not updated.
This commit is contained in:
parent
b272f634c1
commit
bac8b32043
|
@ -69,13 +69,14 @@ final class CancelServerStreamCommand extends WriteQueue.AbstractQueuedCommand {
|
||||||
|
|
||||||
CancelServerStreamCommand that = (CancelServerStreamCommand) o;
|
CancelServerStreamCommand that = (CancelServerStreamCommand) o;
|
||||||
|
|
||||||
return Objects.equal(this.stream, that.stream)
|
return this.stream.equals(that.stream)
|
||||||
&& Objects.equal(this.reason, that.reason);
|
&& this.reason.equals(that.reason)
|
||||||
|
&& this.peerNotify.equals(that.peerNotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hashCode(stream, reason);
|
return Objects.hashCode(stream, reason, peerNotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -83,6 +84,7 @@ final class CancelServerStreamCommand extends WriteQueue.AbstractQueuedCommand {
|
||||||
return MoreObjects.toStringHelper(this)
|
return MoreObjects.toStringHelper(this)
|
||||||
.add("stream", stream)
|
.add("stream", stream)
|
||||||
.add("reason", reason)
|
.add("reason", reason)
|
||||||
|
.add("peerNotify", peerNotify)
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue