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 Nov 29, 2022
1 parent a5cbebb commit 9e821b0
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 9e821b0

Please sign in to comment.