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 ANNAVAR.SATISH committed Mar 6, 2023
1 parent 0d2ec22 commit e327f29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,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 e327f29

Please sign in to comment.