Skip to content

Commit

Permalink
Merge pull request #4037 from nitheesh-daram/ISSUE-4029
Browse files Browse the repository at this point in the history
[ISSUE #4029 ] Comparison using reference equality instead of value equality.[Heartbeat]
  • Loading branch information
wqliang authored May 30, 2023
2 parents dc79036 + 5b09589 commit a6a2793
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public static Builder newBuilder(HeartbeatItem prototype) {
}

public Builder toBuilder() {
return this == DEFAULT_INSTANCE
return this.equals(DEFAULT_INSTANCE)
? new Builder() : new Builder().mergeFrom(this);
}

Expand Down Expand Up @@ -672,7 +672,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
}

public Builder mergeFrom(HeartbeatItem other) {
if (other == HeartbeatItem.getDefaultInstance()) return this;
if (other.equals(HeartbeatItem.getDefaultInstance())) return this;
if (!other.getTopic().isEmpty()) {
topic_ = other.topic_;
onChanged();
Expand Down Expand Up @@ -1178,7 +1178,7 @@ public static Builder newBuilder(Heartbeat prototype) {
}

public Builder toBuilder() {
return this == DEFAULT_INSTANCE
return this.equals(DEFAULT_INSTANCE)
? new Builder() : new Builder().mergeFrom(this);
}

Expand Down Expand Up @@ -1333,7 +1333,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
}

public Builder mergeFrom(Heartbeat other) {
if (other == Heartbeat.getDefaultInstance()) return this;
if (other.equals(Heartbeat.getDefaultInstance())) return this;
if (other.hasHeader()) {
mergeHeader(other.getHeader());
}
Expand Down

0 comments on commit a6a2793

Please sign in to comment.