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
  • Loading branch information
Shawyeok authored and lifepuzzlefun committed Jan 10, 2023
1 parent 0a4f329 commit 3ebd96e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,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 3ebd96e

Please sign in to comment.