Skip to content

Commit

Permalink
[improve][broker] Make Consumer#equals more effective (apache#18662)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9e821b0)
  • Loading branch information
Shawyeok authored and liangyepianzhou committed Dec 14, 2022
1 parent 581c2a3 commit d2b3986
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ public CompletableFuture<Void> checkPermissionsAsync() {
public boolean equals(Object obj) {
if (obj instanceof Consumer) {
Consumer other = (Consumer) obj;
return Objects.equals(cnx.clientAddress(), other.cnx.clientAddress()) && consumerId == other.consumerId;
return consumerId == other.consumerId && Objects.equals(cnx.clientAddress(), other.cnx.clientAddress());
}
return false;
}
Expand Down

0 comments on commit d2b3986

Please sign in to comment.